|
d.none
ans:c
24. #include<stdio.h>
void main(int arg c)
{
char a[]=abcdefghijklmnopqrstuvwxyz;
printf(%d,sizeof(a));
}
a.25 b.26 c.27 d.28
ans:c
25. #include<stdio.h>
void main(int arg c)
{
char a[]=abcdefghijklmnopqrstuvwxyz;
char *p=a;
printf(%d,strlen(p));
p+=10;
printf(%d,strlen(a));
}
a.26 26
b.26 16
c.compilation error
d.16 26
ans:a
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
|
|