37. | main(){
char a[100];
a[0]='a';a[1]]='b';a[2]='c';a[4]='d';
abc(a);
}
abc(char a[]){
a++;
printf("%c",*a);
a++;
printf("%c",*a);
}
|
|||||||
|
38. | What will be output if you will compile and execute the following c code? 1
#include
2
int main(void)
3
{
4
int array[2][2][3]={0,1,2,3,4,5,6,7,8,9,10,11};
5
printf("%d",array[1][0][2]);
6
return 0;
7
}
|
|||||||
|
39. | int DIM(int array[])
{
return sizeof(array)/sizeof(int );
}
main()
{
int arr[10];
printf("The dimension of the array is %d", DIM(arr));
}
}
|
|||||||
|
40. | What will be output if you will compile and execute the following c code? 1
#include
2
int main(void)
3
{
4
int array[3]={5};
5
int i;
6
for(i=0;i<=2;i++)
7
printf("%d ",array[i]);
8
}
|
|||||||
|
41. | main() {
static char names[5][20]={"pascal","ada","cobol","fortran","perl"};
int i;
char *t;
t=names[3];
names[3]=names[4];
names[4]=t;
for (i=0;i<=4;i++)
printf("%s",names[i]);
}
|
|||||||
|
42. | #include
main()
{
struct xx
{
int x=3;
char name[]="hello";
};
struct xx *s=malloc(sizeof(struct xx));
printf("%d",s->x);
printf("%s",s->name);
}
|
|||||||
|
« previous
1
2
3
4
5
6
7
8
9
...next »