|
C QUESTIONS:(30 ques in 30 min)
==============
1) main()
{
char s[]={'1','2','3',0,'1','2','3'};
printf("%s",s);
}
a)123 123
b)123123
c)1230123
d)error
2)main()
{
char *p="Caritor";
*++p;
printf("%s",p);
*++p;
printf("%s",*p);
}
Ans: aritor ritor
3)main()
{
int K,j;
for(k=0;k<10;k++)
{
some codes
}
}
Ans : ERROR since k not declared
4)How to print "%" symbol in printf?
Ans:
printf("\%");
5) What is the max no of char in command line arguments?
6)Can arithmetic Operation be performed on void pointers?
|
|