Professional Documents
Culture Documents
C Ques
C Ques
SECTION 3: C TEST
#include<stdio.h>
main()
char i=0;
for(;i>=0;i++) ;
printf("%d\n",i);
#include<stdio.h>
main()
int i=0;
fork();
printf("%d",i++);
fork();
printf("%d",i++);
fork();
wait();
int (*x)[10];
int (*x)();
#include<stdio.h>
main()
int a=2;
int b=9;
int c=1;
while(b)
if(odd(b))
c=c*a;
a=a*a;
b=b/2;
printf("%d\n",c);
main()
BAD g1;
g1=1;
printf("%d",g1);
main()
STYLE1 x;
STYLE2 y;
clrscr();
x=255;
y=255;
printf("%d %d\n",x,y);
#ifdef TRUE
int I=0;
#endif
main()
int j=0;
printf("%d %d\n",i,j);
#include<stdio.h>
main()
pDestn=malloc(strlen(pSource));
strcpy(pDestn,pSource);
printf("%s",pDestn);
free(pDestn);
(a)Free() fails
(b)Strcpy() fails
(c)prints I love You Daddy
(d)error
#include<stdio.h>
main()
char a[5][5],flag;
a[0][0]='A';
flag=((a==*a)&&(*a==a[0]));
printf("%d\n",flag);
}
AXES TECHNOLOGY
int *p,*q;
p=(int *)1000;
q=(int *)2000;
printf("%d",(q-p));
Ans: 500
a) functin definition
b) function decleration
c) Kernel
Ans: (b)
(a) Stack
(b) Queue
AZTEC
which one sum adds the elements of odd ones and another adds
the elments of even ones.
Section C
class has a method with the same name. If we initialize the base
class pointer with derived
b. Derived method..
Ans. b
handled.