An Editor
A compiler
An operating system
None of these
A number
A special symbol other than underscore
Both of the above
An alphabet
What is the output of the following code?
int arr[5] = {1, 2, 3, 4, 5};printf("%d", arr[3]);
1
2
3
4
Return
GOTO
Switch
exit
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
-1
Null
EOF
What will be the output of following program?
int main() { for(int c=1;c<5;++c); printf(“%d”,c); }
5
6
12345
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.
int my_num = 100,000;
int my_num = 100000;
int my num = 1000;
int $my_num = 10000;
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
pair of parenthesis
semicolon
braces
colon
switch
goto
go back
return
8
16
"r"
"w"
"rw"
"read"
break
continue
Addition, Division, Modulus
Addition, Modulus, Division
Multiplication, Substration, Modulus
Modulus, Multiplication, Substration
Public
Protected
Private
None of the mentioned
Moves the file pointer to a specific location
Reads a file
Writes to a file
Closes a file
Assignment Relational Arithmetic
Arithmetic Relational Assignment
Relational Arithmetic Assignment
Assignment Arithmetic Relational
auto
case
main
default
malloc()
free()
calloc()
realloc()
stdio.h
conio.h
stdlib.h
What will the following code print?
int x = 5;if (x = 0)printf("Zero");elseprintf("Not zero");
Zero
Not zero
Compilation error
Error
10
20
0
None
4 Bytes
8 Bytes
Depends on the system/compiler
Cannot be determined
What is the output of this statement
printf("%d", (a++));
The value of (a + 1)
Error message
Garbage
The current value of a
function(int ptr);
function(int *ptr);
function(*ptr);
function(ptr *int);
It breaks out of both loops.
It only breaks out of the innermost loop.
It causes a compile-time error.
It stops the program.
Algorithm
Flow-Charts
Procedural
Object Oriented
print("Hello World");
echo("Hello World");
printf("Hello World");
for loop
while loop
do-while loop
none of the above
Spaces
Digits
Underscores
Letters
start()
printf()
main()
getch()
results in a syntax error
output Infomax7
outputs garbage
outputs infomax and terminates abruptly
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
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”
Stack
CISC
RISC
Parallel
* / % + - =
= * / % + -
/ * % - + =
* % / - + =
Program will terminate with an error
Undefined behavior
Array index will wrap around
Nominative form
Comparative form
Superlative form
Positive form
The basic data type of C
Qualifier
Short is the qualifier and int is the basic data type
All of the mentioned
try
catch
finally
Read
Write
Execute
Copy
float, double
short int, double, long int
float, double, long double
double, long int, float
Calm
Rough
Hard
Still
compare two numeric values
combine two numeric values
compare two boolean values
None of the above
The dog barked.
The cat chased the mouse.
The dog barked because it was hungry.
The cat chased the mouse, and the mouse ran away.
ctype.h
math.h
int num;
integer num;
num int;
num integer;