How many times will the following loop execute?
int j;for(j = 1; j <= 10; j = j-1)printf("INFOMAX");
Forever
Never
0
10
Constants
Keywords
Operators
Tokens
Using malloc() without free()
Using calloc() without realloc()
Using pointers incorrectly
None of the above
ceil(1.66)
floor(1.66)
roundup(1.66)
roundto(1.66)
for loop
while loop
do-while loop
none of the above
arr[2]
arr(2)
arr[3]
arr[1]
function(int ptr);
function(int *ptr);
function(*ptr);
function(ptr *int);
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.
int arr[10][10];
int arr[10,10];
array int arr[10][10];
int arr{10}{10};
break
continue
return
exit
Spaces
Digits
Underscores
Letters
“programming Trick”
“programming"
‘programming'
$ programming $
1
-1
2
Addition, Division, Modulus
Addition, Modulus, Division
Multiplication, Substration, Modulus
Modulus, Multiplication, Substration
What will be output if you will compile and execute the following c code?
int main(){ int a=5; float b; printf("%d",sizeof(++a+b)); printf(" %d",a); return 0;}
2 6
4 6
2 5
4 5
static
new
volatile
int
float
include
char
int a(char *s)
void b(int a[], int n)
float *c()
short d(long x)
LowerCase letters
UpperCase letters
CamelCase letters
None of these
link, load, code, compile and execute
code, compile, link, execute and load
code, compile, link, load and execute
compile, code, link, load and execute
is executed only once if the condition is true.
is also known as entry-controlled loop.
is executed at least once if the condition is false.
is unconditional looping statement..
C compiler supports octal integer constant.
C compiler supports hexadecimal integer constant.
C compiler supports binary integer constant.
C compiler supports decimal integer constant.
main function arguments
main arguments
Command-Line arguments
Parameterized arguments
ctype.h
stdio.h
conio.h
math.h
4
5
6
Undefined
int number;
float rate;
int variable_count;
int $main;
Compilation error
Program will terminate with an error
Undefined behavior
Array index will wrap around
Id_No
ID_NO
IdNo
Id No
strlen()
sizeof()
length()
strlength()
Binary operator
Unary operator
Ternary operator
All of the above
It is used to define global variables
It is used to define a macro
It is used to include standard or user-defined header files in the program
It is used to include comments in the code
Return
GOTO
Switch
int my_num = 100,000;
int my_num = 100000;
int my num = 1000;
int $my_num = 10000;
What will be the output of following program?
int main() { for(int c=1;c<5;++c); printf(“%d”,c); }
12345
float_int, keyword, A1
ANSI, ascii, cpu
valid, variable, name
What will be the output of the following code segment?
int x = 24, y = 39, z = 45;z = x + y;y = z - y;x = z - y;printf("\n%d %d %d", x, y, z);
24 39 63
39 24 63
24 39 45
39 24 45
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
Error
No output
1return
return1
$return_1
signed short
unsigned short
long
<
=
>=
<=
string.h
graphic.h
Read
Write
Execute
Copy
-3.4e38 to 3.4e38
-32767 to 32768
-32668 to 32667
-32768 to 32767
Decimal
Binary
Octal
Hexadecimal
it Compare the variable a and the variable b are same.
The value of b is assigned to variable a but if b changes later, it will not effect the value of variable a.
The value of b is assigned to variable a but if b changes later, it will effect the value of variable a.
The value of variable a is assigned to variable b, and the value of variable b is assigned to variable a.
It returns the size of the variable in bits
It returns the size of the variable in bytes
It returns the size of the variable in kilobytes
It returns the number of elements in an array
break stops the loop, continue skips the rest of the iteration
Both stop the loop
break skips to the next iteration, continue exits the loop
Both skip to the next iteration
//
/
#
/*