Home > C Programming > Quizzes > C (Programming Language) Quiz
C (Programming Language) Quiz
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 22% Most missed: “A pointer to void named vptr, has been set to point to a floating point variable…”

C (Programming Language) MCQs For LinkedIn Skill Assessments.

C (Programming Language) Quiz
Time left 00:00
25 Questions

1. What is the member access operator for a structure?
2. By default, C Functions are what type of functions?
3. What does the program shown below return?
c
int main(){
int a=1, b=2, c=3, d=4;
int x = a;
if (a>b)
if (b else x=c;
return(x);
}
4. What is the output of this program?
c
main() {
char c1='a' , c2='A';
int i=c2-c1;
printf('%d', i);
}
5. What does the declaration of variable c2 demonstrate?
c
main(){
char c1 ='a';
char c2 = c1+10;
}
6. Describe the relationship between lvalue and rvalue.
7. What is the expression player->name equivalent to?
8. When is memory for a variable allocated?
9. Which line of code, after execution, results in 'i' having the value of 1?
10. Using the Union declaration below, how many bytes of memory space will the data of this type occupy?
c
union Cars {
char make[20];
char model[30];
short year;
} car;
11.

Which operator is used to access the address of a variable?

\r\n
12. Directives are translated by the?
13. Which is _not_ a correct way to declare a string variable?
14. File input and output (I/O) in C is heavily based on the way it is done '___'?
15. In this code sample, what is not a problem for C compiler?
c
main(){
constant int PI = 3.14;
printf('%f\n', pi);
}
16. By default c uses the call by value method to pass arguments to functions. How can you invoke the call by reference method?
17. Consider the number of the Fibonacci series below 100: 0,1,1,2,3,5,8,13,21,34,55,89. Which piece of code outputs the sequence?
18. What is an alternative way to write the expression (\*x).y?
19. What is the value of variable c at the end of this program?

1 main() {
2 int a, b, c;
3 a=10; b=50;
4 c=a * b % a;
5 }
20. What does this function call return?
c
1 main() { float x = f1(10, 5); }
2 float f1(int a, int b) { return (a/b); }
21. A pointer to void named vptr, has been set to point to a floating point variable named g. What is the valid way to dereference vptr to assign its pointed value to a float variable named f later in this program?
c
float g;
void *vptr=&g;
22. Which is _not_ a storage class specifier?
23. Which add function properly returns the updated value of result?
24. The main loop structures in C programming are the for loop, the while loop, and which other loop?
25. What is the difference between scanf() and sscanf() functions?