What will be the output of following program
void main()
{
int x,y = 10;
x = y * NULL;
printf(“\n %d \n", x);
}
error
0
10
Garbage value
What is the output of this C code?
#include
static int x;
if (x++ < 2)
main();
Infinite calls to main
Run time error
Varies
main is called twice
Algorithm
Flow-Charts
Procedural
Object Oriented
Stdio.h
Conio.h
Math.h
Header.h
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
Decimal
Binary
Octal
Hexadecimal
N=m=0
Value+=10
mySize=x<y?9:11
Value=+=10
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
Loop statement
Conditional Statement
Block Statement
All of the above
What will be the output of following program?
int main() { for(int c=1;c<5;++c); printf(“%d”,c); }
1
5
6
12345
A logical error in a program
A difficult syntax error in a paragraph
Both A and B
None of above
stdio.h
stddef.h
stdio.h and stddef.h
math.h
*
&
&&
||
-1
Yes
printf("\n");
echo '\n';
printf('\n');
printf('\\n')
printf();
scanf();
gets();
puts();
Value of elements in array
First element of the array
Base address of the array
Address of the last element of array
dealloc();
malloc(variable_name, 0)
free();
memalloc(variable_name, 0)
malloc() and memalloc()
alloc() and memalloc()
malloc() and calloc()
memalloc() and faralloc()