Documente Academic
Documente Profesional
Documente Cultură
printf("%s\n",(char*)vp+2);
return 0;
}
A)
B)
C)
D)
JCK
J65K
JAK
JACK
q=&j;
if(i>=45)
return(p);
else
return(q);
}
A) 10
B) 20
C) Error: 'Non portable pointer conversion'
D) Error: 'Cannot use static for function parameters'
------------------------------------------------------------------------Q.12) Which of the following statement is correct about k
used in the statement given below ?
char****k;
A)
B)
C)
D)
----------------------------------------------------------------------
5
25
125
Garbage value
int main()
{
printf("%d %d\n",sizeof(NULL),sizeof(**));
return 0;
}
A) 00
B) 01
C) 11
D) 41
-------------------------------------------------------------------Q.18) Which of the following is the correct output for the
program given below?
#include<stdio.h>
int main()
{
int i;
char a[]="\0";
if(printf("%s",a))
printf("String is not empty\n");
else
printf("The string is empty\n");
return 0;
}
A) The string is not empty
B) The string is empty
C) No output
D) 0
----------------------------------------------------------------------Q.19) Which of the following is the correct output for the
Equal
Unequal
Error
None of the above
Error
Icecream chocolate pie
Icecream
Chocoloate pie
Hello
World
Hello World
WorldHello
A)
B)
C)
D)
Equal
Unequal
Error
None of the above
return 0;
}
A)
B)
C)
D)
Error
Icecream Chocolate pie
Icecream
Chocolate pie
Hello
World
Hello World
WorldHello
return 0;
}
A)
B)
C)
D)
10
6
5
11
int main()
{
Struct byte
{
Int one:1;
};
Struct byte var = {1};
Printf(%d\n,var.one);
Return 0;
}
A)
B)
C)
D)
1
-1
0
Error
B) 515 2 3
C) 3 2 5
D) None of the above
Q.27) Which of the following is the correct output for the
program given below ?
#include<stdio.h>
int main()
{
Unsigned int num;
Int c=0;
Scanf(%u,&num);
for(;num;num>=1)
{
If(num &1)c++;
}
Printf(%d\n,c);
Return 0;
}
A)It counts the number of bits that are on in the number num.
B) It sets all bits in the number num to 1.
C) It sets all bits in the number num to 0
D) None of the above