1.
Point out the correct statements are correct about the program below?
#include
int main()
{
char ch;
while(x=0;x<=255;x++)
printf("ASCII value of %d character %c\n", x, x);
return 0;
}
A. 
The code generates an infinite loop
B. 
The code prints all ASCII values and its characters
C. 
Error: x undeclared identifier
D. 
Error: while statement missing
2.
Which of the following is the correct usage of conditional operators used in C?
A. 
B. 
C. 
Max = a>b ? a>c?a:c:b>c?b:c
D. 
3.
If a function contains two return statements successively, the compiler will generate warnings. Yes/No?
4.
What will be the output of the program ?
#include
int main()
{
float arr[] = {12.4, 2.3, 4.5, 6.7};
printf("%d\n", sizeof(arr)/sizeof(arr[0]));
return 0;
}
A. 
B. 
C. 
D. 
5.
Is there any difference int the following declarations?
int fun(int arr[]);
int fun(int arr[2]);
6.
Does there exist any way to make the command-line arguments available to other functions without passing them as arguments to the function?
7.
What function should be used to free the memory allocated by calloc()?
A. 
B. 
C. 
D. 
Memalloc(variable_name, 0)
8.
What do the following declaration signify?
void *cmp();
A. 
Cmp is a pointer to an void type
B. 
Cmp is a void type pointer variable.
C. 
Cmp is a function that return a void pointer.
D. 
Cmp function returns nothing.
9.
What will be the output of the program?
#include
int main()
{
char huge *near *far *ptr1;
char near *far *huge *ptr2;
char far *huge *near *ptr3;
printf("%d, %d, %d\n", sizeof(**ptr1), sizeof(ptr2), sizeof(*ptr3));
return 0;
}
A. 
B. 
C. 
D. 
10.
We can modify the pointers "source" as well as "target".
11.
Will the program outputs "IndiaBIX.com"? #includeint main(){ char str1[] = "IndiaBIX.com"; char str2[20]; strncpy(str2, str1, 8); printf("%s", str2); return 0;}
12.
Which of the following cannot be checked in a switch-case statement?
A. 
B. 
C. 
D. 
13.
Which of the following statements are correct about the program?
#include
int main()
{
int x = 30, y = 40;
if(x == y)
printf("x is equal to y\n");
else if(x > y)
printf("x is greater than y\n");
else if(x < y)
printf("x is less than y\n")
return 0;
}
A. 
B. 
C. 
D. 
14.
Are the following two statement same?
1. a <= 20 ? (b = 30): (c = 30);
2. (a <=20) ? b : (c = 30);
15.
What will be the output of the program ?#include int main(){ char *str; str = "%d\n"; str++; str++; printf(str-2, 300); return 0;}
A. 
B. 
C. 
D. 
16.
The library function used to reverse a string is ____
A. 
B. 
C. 
D. 
17.
Point out the error in the program?
struct emp
{
int ecode;
struct emp *e;
};
A. 
Error: in structure declaration
B. 
C. 
D. 
18.
In Turbo C/C++ under DOS if we want that any wild card characters in the command-line arguments should be appropriately expanded, are we required to make any special provision?
19.
Bitwise | can be used to multiply a number by powers of 2.
20.
What does the following declaration signify?
int *f();
A. 
F is a pointer variable of function type.
B. 
F is a function returning pointer to an int.
C. 
D. 
F is a simple declaration of pointer variable.
21.
Which of the following is the correct order of evaluation for the below expression?
z = x + y * z / 4 % 2 - 1
A. 
B. 
C. 
D. 
22.
Will the printf() statement print the same values for any values of a?#includeint main(){ float a; scanf("%f", &a); printf("%f\n", a+a+a); printf("%f\n", 3*a); return 0;}
23.
What will be the output of the program if the array begins 1200 in memory?#include int main(){ int arr[]={2, 3, 4, 1, 6}; printf("%u, %u, %u\n", arr, &arr[0], &arr); return 0;}
A. 
B. 
C. 
D. 
24.
What will be the output of the program?
#include
int main()
{
printf(5+"IndiaBIX\n");
return 0;
}
A. 
B. 
C. 
D. 
25.
Point out the error in the program?
struct emp
{
int ecode;
struct emp e;
};
A. 
Error: in structure declaration
B. 
C. 
D.