Question 1 of 25
Hints left: 3
Q1
What will be the output of the following C code if the input given to the code shown below is "examveda"? #include<stdio.h> #define NL '\n' void main() { void f(void); printf("enter the word\n"); f(); } void f(void) { char c; if((c=getchar())!=NL) { f(); printf("%c",c); } return; }
Q2
What will be the output of the following C code? #include <stdio.h> void inline func1(char b[10]) { printf ("%c\n",b[2]); } int main() { func1("examveda"); return 0; }
Q3
The following C code results in an error. State whether this statement is true or false. #include <stdio.h> void f(double b) { printf ("%ld\n",b); } int main() { inline f(100.56); return 0; }
Q4
Suppose we transfer a file written on a little endian machine to a big endian machine and there is no transformation from little endian to big endian, then what happens?
Q5
Functions in C Language are always . . . . . . . .
Q6
What is the output of this C code? #include <stdio.h> main() { char *p = "Examveda C-Test"; p[0] = 'a'; p[1] = 'b'; printf("%s", p); }
Q7
Which symbol is used for the 'modulo' operation in C?
Q8
What is the difference between the following 2 C codes? #include <stdio.h> //Program 1 int main() { int d, a = 1, b = 2; d = a++ + ++b; printf("%d %d %d", d, a, b); } #include <stdio.h> //Program 2 int main() { int d, a = 1, b = 2; d = a++ +++b; printf("%d %d %d", d, a, b); }
Q9
What will be the output of the following C code? #include<stdio.h> int main() { signed char ch= ‘a’; printf(“%u”,ch); return 0; }
Q10
What is the primary purpose of a function prototype in C?
Q11
A machine in which the least significant byte is stored in the smallest address is . . . . . . . .
Q12
What will be the error in the following C code? main() { long float a=-25.373e22; printf("%lf",a); }
Q13
What will be the output of the following C code? #include<stdio.h> static inline int max(int a, int b) { return a > b ? a : b; } main() { int m; m=max(-6,-5); printf("%d",m); }
Q14
File formats which have . . . . . . . . as a basic unit are independent of endianness.
Q15
What will be the output of the following C code? #include<stdio.h> extern inline int min(int a, int b) { return a < b ? a : b; } main() { int m; m=min(3,-5); printf("%d",m); }
Q16
What is the correct syntax for declaring a variable in C?
Q17
What is the binary representation of the integer -14?
Q18
What will be the output of the following C code? #include<stdio.h> int main() { int n=10; int f(int n); printf("%d",f(n)); } int f(int n) { if(n>0) return(n+f(n-2)); }
Q19
What will be the output of the following C code? #include<stdio.h> int main() { printf("Hello"); main(); return 0; }
Q20
Which of the following declaration is not supported by C language?
Q21
Sign qualifiers can be applied to double.
Q22
Which character is used to indicate the end of a statement in C?
Q23
Which data type is used to represent a single character in C?
Q24
What will be the output of the following C code? main() { unsigned a=10; long unsigned b=5l; printf(“%lu%u”,a,b); }
Q25
Iteration requires more system memory than recursion.