-1
1
Null
EOF
char > int > float
int > char > float
char < int < double
double > char > int
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
0
Depends on array size
for loop
while loop
do-while loop
None of the above
What will the following code print?
int x = 5;if (x = 0)printf("Zero");elseprintf("Not zero");
Zero
Not zero
Compilation error
Error
Moves the file pointer to a specific location
Reads a file
Writes to a file
Closes a file
Raj says, “He wants ice cream”
Raj had said, “He wants an ice-cream”
Raj will say, “I want an ice-cream”
Raj said, “I want an ice-cream”
return
static
new
volatile
A
B
ADA
C++
Infinitely
Variable
10
20
None
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");
main function arguments
main arguments
Command-Line arguments
Parameterized arguments
Consider the following code and How many bytes of memory will be allocated?
int *ptr = (int *)malloc(10 * sizeof(int));
10 bytes
20 bytes
80 bytes
40 bytes
2.5
2
2.000000
2.500000
char
int
float
double
It breaks out of both loops.
It only breaks out of the innermost loop.
It causes a compile-time error.
It stops the program.
Calm
Rough
Hard
Still
Please close the door.
It is drizzling outside.
Is the food ready?
He is not here yet.
-5
+5
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
*
+
++
&&
_infomax
3infomax
infomax_ica
infomax123
//
/
#
/*
Either True or False
is less than or is more than
is equal or less or more
All of the above
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.
They can contain alphanumeric characters as well as special characters
It is not an error to declare a variable to be one of the keywords(like goto, static)
Variable names cannot start with a digit
Variable can be of any length
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
What will be the output of following program?
int main() { for(int c=1;c<5;++c); printf(“%d”,c); }
5
6
12345
try
catch
finally
None of these
“programming Trick”
“programming"
‘programming'
$ programming $
4 Bytes
8 Bytes
Depends on the system/compiler
Cannot be determined
An array of characters
The object of some class
Same as other primitive data type
Linkedlist of characters
strlen()
sizeof()
length()
strlength()
Stack
CISC
RISC
Parallel
break
exit(0)
abort()
All of the mentioned
What will be the output of the following pseudo code ?
Integer aSet a =4do print a + 2 a = a-1while (a not equals 0)end while
6 6 6 6
6 5 4 3
6 7 8 9
6 8 10 12
How many times will the following loop execute?
int j;for(j = 1; j <= 10; j = j-1)printf("INFOMAX");
Forever
Never
Find the output of following code :
int main() { int i=-2; printf (“-i=%d”,-i); return b; }
–i=2
i=-2
–i=-2
–i=+2
System programming language
General purpose language
Data processing language
float, double
short int, double, long int
float, double, long double
double, long int, float
fclose()
closefile()
fileclose()
endfile()
LowerCase letters
UpperCase letters
CamelCase letters
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.
What is the final value of x when the code is executed?
int x; for(x=0; x<10; x++) {}
9
Binary operator
Unary operator
Ternary operator
What is the output of this statement
printf("%d", (a++));
The value of (a + 1)
Error message
Garbage
The current value of a