C Programming

What is the syntax for declaring a variable in C?
Datatype variableName;
VariableName datatype;
VariableName = datatype;
Datatype = variableName;
Which of the following is not a valid data type in C?
Float
String
Int
Char
Double
What is the output of the following code?\n\n#include \n\nint main() {\n int x = 5;\n printf(\
5
6
4
0
Which operator is used to access the value at a specific memory address in C?
*
&
The '*' operator is used to access the value at a specific memory address in C. It is called the 'dereference' or 'indirection' operator.
What is the result of the following expression?\n\n10 / 3
3
3.33
3.3333
3.333333
Which header file should be included to use the printf() function in C?
Stdio.h
Math.h
Stdlib.h
String.h
What is the correct way to comment a single line in C?
// This is a comment
/* This is a comment */
# This is a comment
-- This is a comment
Which of the following is not a valid C keyword?
Int
Float
Main
Begin
Char
What is the purpose of the 'return' statement in a C program?
To end the execution of a function and return a value
To print output to the console
To declare a variable
To include a header file
What is the correct way to declare a constant in C?
Const datatype CONSTANT_NAME = value;
Datatype CONSTANT_NAME = value;
CONSTANT_NAME = value;
Value = CONSTANT_NAME;
What is the output of the following code?\n\n#include \n\nint main() {\n int I;\n for (i = 0; I < 5; i++) {\n printf(\
0 1 2 3 4
1 2 3 4 5
0 1 2 3
1 2 3 4
Which operator is used to access the address of a variable in C?
&
*
The '&' operator is used to access the address of a variable in C. It is called the 'address-of' operator.
What is the result of the following expression?\n\n5 + 3 * 2
11
16
13
10
Which header file should be included to use the scanf() function in C?
Stdio.h
Math.h
Stdlib.h
String.h
What is the correct way to comment multiple lines in C?
/* This is a comment */
// This is a comment
# This is a comment
-- This is a comment
{"name":"C Programming", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"What is the syntax for declaring a variable in C?, Which of the following is not a valid data type in C?, What is the output of the following code?\\n\\n#include \\n\\nint main() {\\n int x = 5;\\n printf(\\","img":"https://www.quiz-maker.com/3012/images/ogquiz.png"}
Powered by: Quiz Maker