a . programming errors
b . hardware damage
c . data entry errors
d . physical conditions
Q. 12 . Find the output.
void main()
{
int i;
for(i=-9;!i;i++);
printf("%d",-i);
}
a . 8
b . 9
c . 0
d . 1
Q. 13 . Switch-case statement does not implement on
a . non exclusive case
b . mutually exclusive case
c . mutually non exclusive case
d . exclusive case
Q. 14 . Find out the output.
void main()
{
int i=98;
while(100-i++)
printf("%u",i);
switch(i)
case ‘e’:
printf("Fool");
}
a . 98 99 100
b . 99 100
c . 99 100 Fool
d . Expression syntax error
Q. 15 . Find out the output
void main()
{
if("lakshya"=="lakshya")
printf("equal");
else
printf("not equal");
}
a . equal
b . not equal
c . Compile time error
d . None of these
Q. 16 . Find the output.
void main()
{
char s=’A’;
char a=’a’;
printf("%d",s-a);
}
a . -32
b . -18
c . Error
d . None of these
Q. 17 . Find out the true statement.
a . A union variable can be assigned to another union variable.
b . The address of union variable can be extracted by using & operator.
c . A function can return a pointer to the union.
d . All the above
Q. 18 . Find out the output
#define min(a,b) ((a)<(b))?(a):(b)
main() {
int i=0,a[20],*ptr;
ptr=a;
while(min(ptr++,&a[9])<&a[8])
i=i+1;
printf("i=%d\n",i);
}
a . 7 b . 6 c . 5 d . compile time erro
Q. 19 . To flush all output streams we can write
a . fflush(stdout)
b . fflush(NULL)
c . fflush(ALL)
d . None of these
No comments:
Post a Comment