Using malloc() without free()
Using calloc() without realloc()
Using pointers incorrectly
None of the above
-4
-2.8
+2.8
+3
main function arguments
main arguments
Command-Line arguments
Parameterized arguments
Moves the file pointer to a specific location
Reads a file
Writes to a file
Closes a file
Either True or False
is less than or is more than
is equal or less or more
All of the above
int num;
integer num;
num int;
num integer;
compare two numeric values
combine two numeric values
compare two boolean values
A number
A special symbol other than underscore
Both of the above
An alphabet
float_int, keyword, A1
ANSI, ascii, cpu
valid, variable, name
float, double
short int, double, long int
float, double, long double
double, long int, float
ctype.h
stdio.h
conio.h
math.h
ceil(1.66)
floor(1.66)
roundup(1.66)
roundto(1.66)
30
32
36
40
start()
printf()
main()
getch()
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
-1
1
Null
EOF
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
4
8
16
//
/
#
/*
float
real
int
double
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
do-while
if-else
for
while
*
+
++
&&
2
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 $
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
A
B
ADA
C++
power of y to the x
power of x to the y
logarithm of x on the base y
Such function does not exist
An Editor
A compiler
An operating system
None of these
strlen()
sizeof()
length()
strlength()
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.
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
for loop
while loop
do-while loop
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);}
0
Error because of incorrect line-1 only.
Error because of incorrect line-1 and line-2.
Error because of incorrect line-2 only.
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.
5
6
Undefined
Assignment Relational Arithmetic
Arithmetic Relational Assignment
Relational Arithmetic Assignment
Assignment Arithmetic Relational
AT & Ts Bell Laboratories of USA in 1972
AT & Ts Bell Laboratories of USA in 1970
Sun Microsystems in 1973
Cambridge University in 1972
Binary operator
Unary operator
Ternary operator
How many times will the following loop execute?
int j;for(j = 1; j <= 10; j = j-1)printf("INFOMAX");
Forever
Never
10
infomax
info_max
info max
All of these
Infinitely
Variable
return
static
new
volatile
getchar()
gets()
scanf()
cin.get()
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
int a = 10, b = 5;printf("%d", a / b);
0.5
15
Compilation error
Program will terminate with an error
Undefined behavior
Array index will wrap around
final
constant
const