1.
Which of the following statements should be used to obtain a remainder after dividing 3.14 by 2.1 ?
A. 
B. 
C. 
D. 
Remainder cannot be obtain in floating point division.
2.
Point out the error in the following program #include<stdio.h>
int main()
{
display();
return 0;
}
void display()
{
printf("Welcome To Tait");
}
A. 
B. 
Display() doesn't get invoked
C. 
Display() is called before it is defined
D. 
3.
Which statement will you add in the following program to work it correctly? #include<stdio.h>
int main()
{
printf("%f\n", log(36.0));
return 0;
}
A. 
B. 
C. 
D. 
4.
In which header file is the NULL macro defined?
A. 
B. 
C. 
D. 
5.
Point out the error in the program #include<stdio.h>
int main()
{
int a[] = {10, 20, 30, 40, 50};
int j;
for(j=0; j<5; j++)
{
printf("%d\n", a);
a++;
}
return 0;
}
A. 
Error: Declaration syntax
B. 
C. 
D. 
6.
Which bitwise operator is suitable for checking whether a particular bit is on or off?
A. 
B. 
C. 
D. 
7.
Assunming, integer is 2 byte, What will be the output of the program? #include<stdio.h>
int main()
{
printf("%x\n", -1>>1);
return 0;
}
A. 
B. 
C. 
D. 
8.
What function should be used to free the memory allocated by calloc() ?
A. 
B. 
C. 
D. 
Memalloc(variable_name, 0)
9.
What will be the output of the program? #include
#include
int main()
{
char *s;
char *fun();
s = fun();
printf("%s\n", s);
return 0;
}
char *fun()
{
char buffer[30];
strcpy(buffer, "RAM");
return (buffer);
}
A. 
B. 
C. 
D. 
10.
Which standard library function will you use to find the last occurance of a character in a string in C?
A. 
B. 
C. 
D. 
11.
How many times the program will print "vardhaman" ? #include<stdio.h>
int main()
{
printf("vardhaman");
main();
return 0;
}
A. 
B. 
C. 
D. 
12.
Which of the following statements are correct about the program? #include<stdio.h>
int main()
{
printf("%d\n", main());
return 0;
}
A. 
It prints garbage values infinitely
B. 
Runs infinitely without printing anything
C. 
Error: main() cannot be called inside printf()
D. 
No Error and print nothing
13.
What does the following declaration mean?int (*ptr)[10];
A. 
Ptr is array of pointers to 10 integers
B. 
Ptr is a pointer to an array of 10 integers
C. 
Ptr is an array of 10 integers
D. 
Ptr is an pointer to array
14.
What will be the output of the program ? #include<stdio.h>
void fun(int **p);
int main()
{
int a[3][4] = {1, 2, 3, 4, 4, 3, 2, 8, 7, 8, 9, 0};
int *ptr;
ptr = &a[0][0];
fun(&ptr);
return 0;
}
void fun(int **p)
{
printf("%d\n", **p);
}
A. 
B. 
C. 
D. 
15.
What will be the output of the program ? #include<stdio.h>
int main()
{
float arr[] = {12.4, 2.3, 4.5, 6.7,11.2};
printf("%d\n", sizeof(arr)/sizeof(arr[0]));
return 0;
}
A. 
B. 
C. 
D. 
16.
What does fp point to in the program ? #include<stdio.h>
int main()
{
FILE *fp;
fp=fopen("trial", "r");
return 0;
}
A. 
The first character in the file
B. 
A structure which contains a char pointer which points to the first character of a file.
C. 
D. 
The last character in the file.
17.
Which of the following are unary operators in C?1. !2. sizeof3. ~4. &&
A. 
B. 
C. 
D. 
18.
What will be the output of the program? #include<stdio.h>
int main()
{
int i=-3, j=2, k=0, m;
m = ++i || ++j && ++k;
printf("%d, %d, %d, %d\n", i, j, k, m);
return 0;
}
A. 
B. 
C. 
D. 
19.
What will be the output of the program ? #include<stdio.h>
#include<string.h>
int main()
{
char str1[20] = "Hello", str2[20] = " World";
printf("%s\n", strcpy(str2, strcat(str1, str2)));
return 0;
}
A. 
B. 
C. 
D. 
20.
What do the 'c' and 'v' in argv stands for?
A. 
'c' means argument control 'v' means argument vector
B. 
'c' means argument count 'v' means argument vertex
C. 
'c' means argument count 'v' means argument vector
D. 
'c' means argument configuration 'v' means argument visibility
21.
What will the SWAP macro in the following program be expanded to on preprocessing? will the code compile? #include<stdio.h>
#define SWAP(a, b, c)(c t; t=a, a=b, b=t)
int main()
{
int x=10, y=20;
SWAP(x, y, int);
printf("%d %d\n", x, y);
return 0;
}
A. 
B. 
C. 
D. 
Compiles and print nothing
22.
Which header file should be included to use functions like malloc() and calloc()?
A. 
B. 
C. 
D. 
23.
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. 
24.
The keyword used to transfer control from a function back to the calling function is
A. 
B. 
C. 
D. 
25.
In which numbering system can the binary number 1011011111000101 be easily converted to?
A. 
B. 
C. 
D.