1.
What is the output?
main()
{
char val[] = {‘a’,’b’,’c’,’\n’,’c’,’\0’};
char *p, *val1, *val2;
p = &val[3];
val1 = val;
val2 = val;
printf(“%d”, ++*p + ++*val1 – 32);
}
A. 
Non-portable pointer conversion
B. 
C. 
D. 
2.
What is the output?
main()
{
char *arr = “abc defg”, *x;
x = arr;
while( *arr != ‘\0’ )
++*arr++;
printf(“%s %s”,arr,x);
}
A. 
B. 
C. 
D. 
3.
What is the output?
main()
{
char far *ptr1, *ptr2;
printf(“%d %d”,sizeof(ptr1),sizeof(ptr2));
}
A. 
B. 
C. 
D. 
4.
What is the output?
main()
{
char family[4][20] = { “jesus”, “ram” , “rahim” , “gurunanak” };
char *temp;
int count ;
temp = family[1];
family[1] = family[2]; // Lvalue required for this line
family[2] = temp; // Lvalue required for this line
for(count = 0 ;count
A. 
Non portable pointer conversion
B. 
Compilation error-Lvalue required
C. 
jesus rahim ram gurunanak
D. 
Jesus ram rahim gurunanak
5.
Int main()
{
struct Some Name
{
int size = 5;
char tips[] = "LEARN";
};
struct SomeName ss;
printf("\n %d %s",ss.size,ss.tips);
return 0;
}
A. 
Structure cannot be defined inside main()
B. 
C. 
Structure member can not be initialized
D. 
Structure can not have char[]
6.
Main()
{
struct xx
{
int x=3;
char name[]="hello";
};
struct xx *s=malloc(sizeof(struct xx));
printf("%d",s->x);
printf("%s",s->name);
}
A. 
B. 
C. 
D. 
7.
Main()
{
char *str1="abcd";
char str2[]="abcd";
printf("%d %d %d",sizeof(str1),sizeof(str2),sizeof("abcd"));
}
A. 
B. 
C. 
D. 
8.
Void main()
{
int array[]={10,20,30,40};
printf("%d",-2[array]);
}
A. 
B. 
C. 
D. 
9.
Main()
{
char s[ ]="man";
int i;
for(i=0;s[ i ];i++)
printf("\n%c%c%c%c",s[ i ],*(s+i),*(i+s),i[s]);
}
A. 
B. 
C. 
D. 
10.
What is the the output ? main()
{
int c[ ]={2.8,3.4,4,6.7,5};
int j,*p=c,*q=c;
for(j=0;j
A. 
B. 
C. 
D. 
11.
What is the output ? main()
{
int i=-1,j=-1,k=0,l=2,m;
m=i++&&j++&&k++||l++;
printf("%d %d %d %d %d",i,j,k,l,m);
}
A. 
B. 
C. 
D. 
12.
What is the output ?
void main()
{
char a[]="12345\0";
int i=strlen(a);
printf("here in 3 %d\n",++i);
}
A. 
B. 
C. 
D. 
13.
Which of the following doesn’t match an array
A. 
B. 
C. 
D. 
14.
Which of the following character is appended with a string
A. 
B. 
C. 
D. 
15.
What is the output ? #include
#include
int main()
{
char *str = "x";
char c = 'x';
char ary[1];
ary[0] = c;
printf("%d %d", strlen(str), strlen(ary));
return 0;
}
A. 
B. 
C. 
D. 
16.
What will be the output?
void main()
{
char c=125;
c=c+10;
printf(“%d”,c);
}
A. 
B. 
C. 
D. 
17.
Void main()
{
int a[]={0,1,2,3,4};
int * p[]={a,a+1,a+2,a+3.a+4};
printf(“%d”,*(*p));
}
A. 
B. 
C. 
D. 
18.
An array is a
A. 
B. 
C. 
D. 
19.
The array name indicates
20.
The difference between a character array and string is
A. 
B. 
Appended ‘\0’ in character array
C. 
%s can’t be used for character array
D.