|
26. if a file contains the IT solutions Inc.rn then on reading this
line the array str using fgets() what would str contain?
a. IT solutions Inc.
b. IT solutions Inc.r0
c. IT solutions Inc.rn0
d. IT solutions Inc.n0
27. if the following program (myprog)is run from the command line as
myprog 1 2 3
what would be the output?
Main(int argc , char *argv[])
{
int I ,j=0;
for (I=0;I<argc;I++)
j=j+atoi(argv[i]);
printf(%d.j);
}
a. 123 b.6 c.error d.123
ans:6
28. when pointers declared initialized to :
a. null
b.newly allocated memory
c)nothing,its random
d)none of the above
ans:c
29. what is the output of the following code?
#include<stdio.h>
void main()
{
printf("%d",printf(" hello world "));
}
a) 13, b) hello world 13, c) hello world, d) error
ANS:b
30. what is the output of the following code, assuming that the array
begins at location 5364875?
#include<stdio.h>
void main()
{
int a[2][3][4]={
{2,1,4,3,6,5,8,7,0,9,2,2}
{1,2,3,4,5,6,7,8,9,0,1,2}
|
|