int arr[10][10];
int arr[10,10];
array int arr[10][10];
int arr{10}{10};
What is the output of the following code?
main(){ int a, b; a=b=4; b=a++; printf("%d %d %d %d", a++, --b, ++a, b--);}
5 3 7 3
Syntax error
5 4 5 3
6 2 6 4
A
B
ADA
C++
is executed only once if the conditions is true
is also known as entry-controlled loop
is executed at least once if the conditions is false
the unconditional loop
What will be the output of following program?
int main() { for(int c=1;c<5;++c); printf(“%d”,c); }
1
5
6
12345
What will be the output of the following program?
int main() { int x=5; printf(“%d %d %d”,x,x<<2,x>>2); }
1 20 5
5 1 20
5 20 1
20 1 5
ceil(1.66)
floor(1.66)
roundup(1.66)
roundto(1.66)
power of y to the x
power of x to the y
logarithm of x on the base y
Such function does not exist
int
float
include
char
"r"
"w"
"rw"
"read"
Return
GOTO
Switch
exit
print()
scanf()
input()
All of the above
getchar()
gets()
cin.get()
stdio.h
conio.h
stdlib.h
None of these
&
&&
||
!
When the following piece of code is executed, what happens?
b = 3;a = b++;
a contains 3 and b contains 4
a contains 4 and b contains 4
a contains 4 and b contains 3
a contains 3 and b contains 3
2.5
2
2.000000
2.500000
do-while
if-else
for
while
*
+
++
arr[4]
arr(5)
arr[5]
arr[6]
| |
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.
Compiler
Interpreter
Assembler
None of These
arr[2]
arr(2)
arr[3]
arr[1]
int func();
func() int;
function int func();
declare int func();
char > int > float
int > char > float
char < int < double
double > char > int
Either True or False
is less than or is more than
is equal or less or more
Moves the file pointer to a specific location
Reads a file
Writes to a file
Closes a file
1return
return1
return
$return_1
Using malloc() without free()
Using calloc() without realloc()
Using pointers incorrectly
None of the above
10
20
0
None
How many times will the following loop execute?
int j;for(j = 1; j <= 10; j = j-1)printf("INFOMAX");
Forever
Never
Logical Operator
Conditional Operator
typecast
Ternary
N=m=0
Value+=10
mySize=x<y?9:11
Value=+=10
Keywords can be used as variable names
Variable names can contain digits
Variable names do not contain blank spaces
Capital letters can be used in variable names.
They execute programs faster than compilers
They translate the entire program at once
They translate and execute code line by line
They are not used in modern programming
LowerCase letters
UpperCase letters
CamelCase letters
An array of characters
The object of some class
Same as other primitive data type
Linkedlist of characters
static
new
volatile
fclose()
closefile()
fileclose()
endfile()
getch()
getche()
What will be the output of the following code?
int main(){int x,y,z;x='1'-'0'; /* line-1 */y='a'-'b'; /* line-2 */z=x+y;printf("%d",z);}
Error because of incorrect line-1 only.
Error because of incorrect line-1 and line-2.
Error because of incorrect line-2 only.
link, load, code, compile and execute
code, compile, link, execute and load
code, compile, link, load and execute
compile, code, link, load and execute
-1
Null
EOF
real
double
Infinitely
Variable
main function arguments
main arguments
Command-Line arguments
Parameterized arguments
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");
4
Undefined
results in a syntax error
output Infomax7
outputs garbage
outputs infomax and terminates abruptly