What is the output of the following code?
int x = 5;if (x > 3) { printf("Greater than 3"); } else { printf("Not greater than 3"); }
Greater than 3
Not Greater than 3
Error
No Output
2.5
2
2.000000
2.500000
<
=
>=
<=
To determine which operator evaluated first from left to right.
To determine the level of an operator in a program.
To determine how an expression involving more than one operator is evaluated.
To check the expression is valid or not.
The basic data type of C
Qualifier
Short is the qualifier and int is the basic data type
All of the mentioned
do-while
if-else
for
while
int arr[5] = {1, 2, 3, 4, 5};printf("%d", arr[3]);
1
3
4
Spaces
Digits
Underscores
Letters
To exit the function and return control to the calling function
To pause the function temporarily
To call the function again
To exit the program
“programming Trick”
“programming"
‘programming'
$ programming $
float
double
long double
far double
char > int > float
int > char > float
char < int < double
double > char > int
stdio.h
conio.h
stdlib.h
None of these
Assignment Relational Arithmetic
Arithmetic Relational Assignment
Relational Arithmetic Assignment
Assignment Arithmetic Relational
-3.4e38 to 3.4e38
-32767 to 32768
-32668 to 32667
-32768 to 32767
int arr[10][10];
int arr[10,10];
array int arr[10][10];
int arr{10}{10};
Compiler
Interpreter
Assembler
None of These
put together the file and functions that are required by the program
translate the instructions into a form suitable for execution by the program
load the executable code into the memory and execute them
allow the user to type the program
ctype.h
math.h
Compilation error
Program will terminate with an error
Undefined behavior
Array index will wrap around
void
endl
switch
main function arguments
main arguments
Command-Line arguments
Parameterized arguments
Nested structure
Recursive structure
Union structure
Inline structure
Return
GOTO
Switch
exit
"r"
"w"
"rw"
"read"
//
/
#
/*
Binary operator
Unary operator
Ternary operator
All of the above
* / % + - =
= * / % + -
/ * % - + =
* % / - + =
0
-1
Depends on array size
ceil(1.66)
floor(1.66)
roundup(1.66)
roundto(1.66)
LowerCase letters
UpperCase letters
CamelCase letters
In the following nested conditional statements, which branch will execute?
int x = 4;if (x > 2) { if (x < 5) { printf("x is between 2 and 5"); }} else { printf("x is 2 or less");}
x is between 2 and 5
x is 2 or less
No output
What is the output of this statement
printf("%d", (a++));
The value of (a + 1)
Error message
Garbage
The current value of a
pair of parenthesis
semicolon
braces
colon
break
continue
return
Decimal
Binary
Octal
Hexadecimal
10
20
None
It exits the current loop and continues with the next iteration
It terminates the current loop and transfers control to the next statement after the loop
It skips the current iteration and moves to the next iteration
It repeats the current iteration
Depends on the system
for (int i = 0; i < 10; i++)
for i = 0 to 10 step 1
for (i = 0; i < 10; i++)
for (i < 10; i++)
Constants
Keywords
Operators
Tokens
Read
Write
Execute
Copy
results in a syntax error
output Infomax7
outputs garbage
outputs infomax and terminates abruptly
*
+
++
&&
Either True or False
is less than or is more than
is equal or less or more
8
16
Both can occur multiple times, but a declaration must occur first.
A definition occurs once, but a declaration may occur many times.
Both can occur multiple times, but a definition must occur first.
A declaration occurs once, but a definition may occur many times.
for (i=1; i < 20; i++) printf ("k");
for (i=1; i = 20; i++) printf ("k");
for (i=0; i < 20; i++) printf ("k");
for (i=0; i <= 20; i++) printf ("k");
float, double
short int, double, long int
float, double, long double
double, long int, float