C Questions and Answers – Signed Qualifier

This set of C Multiple Choice Questions & Answers (MCQs) focuses on “Signed Qualifier”. 1. In a signed integer, the sign is represented by ___________ a) Least significant bit b) Most significant bit c) System dependent d) The mean of the most significant bit and the least significant bit 2. Sign qualifiers can be applied … Read more

advertisement

C Questions and Answers – Recursion

This set of C Multiple Choice Questions & Answers (MCQs) focuses on “Recursion”. 1. What will be the output of the following C code? #include<stdio.h> main() { int n; n=f1(4); printf("%d",n); } f1(int x) { int b; if(x==1) return 1; else b=x*f1(x-1); return b; } a) 24 b) 4 c) 12 d) 10 2. The … Read more

advertisement

C Questions and Answers – Endianness

This set of C Multiple Choice Questions & Answers (MCQs) focuses on “Endianness”. 1. A machine in which the least significant byte is stored in the smallest address is __________ a) Big endian machine b) Bi-endian machine c) Binary bit machine d) Little endian machine 2. If the output of the following C code is … Read more

advertisement

C Questions and Answers – Inline

This set of C Multiple Choice Questions & Answers (MCQs) focuses on “Inline”. 1. Name the function whose definition can be substituted at a place where its function call is made _________ a) friends function b) inline function c) volatile function d) external function 2. What will be the output of the following C code? … Read more

advertisement

C Questions and Answers – Token Concatenation

This set of C Multiple Choice Questions & Answers (MCQs) focuses on “Token Concatenation”. 1. Which of the following operators is used to concatenate two strings without space? a) # b) < > c) ** d) ## 2. What will be the output of the following C code? #include <stdio.h> #define p( n ) printf( … Read more

advertisement

C Questions and Answers – Conditional Preprocessor Directives – 2

This set of C Multiple Choice Questions & Answers focuses on “Conditional Preprocessor Directives – 2”. 1. What will be the output of the following C code? #include<stdio.h> #define san 10 main() { #ifdef san #define san 20 #endif printf("%d",san); } a) 10 b) 20 c) Error d) 1020 2. What will be the output … Read more

advertisement

C Questions and Answers – Conditional Preprocessor Directives – 1

This set of C MCQs focuses on “Conditional Preprocessor Directives – 1”. 1. What will be the output of the following C code? #include<stdio.h> #define max 100 main() { #ifdef max printf("hello"); } a) 100 b) hello c) “hello” d) error 2. _______________ is the preprocessor directive which is used to end the scope of … Read more

advertisement

C Questions and Answers – Stringizers

This set of C Multiple Choice Questions & Answers focuses on “Stringizers”. 1. Which of the following is a stringizing operator? a) < > b) # c) % d) ## 2. What will be the output of the following C code? #define sanfoundry(s,n) #s #n main() { printf(sanfoundry(hello,world)); } a) sanfoundry(hello,world) b) sanfoundry c) hello,world … Read more

advertisement

C Questions and Answers – Pragma

This set of C MCQs focuses on “Pragma”. 1. The preprocessor directive used to give additional information to the compiler, beyond which is conveyed in the language _____________ a) #include b) #define c) #pragma d) #elif 2. What will be the output of the following C code, if it is run on a 32 bit … Read more

advertisement

C Questions and Answers – DMA Functions, Memory Leak, Dangling Pointers – 2

This set of C Interview Questions and Answers focuses on “DMA Functions, Memory Leak, Dangling Pointers – 2”. 1. What will be the output of the following C code if it is executed on a 32 bit processor? #include<stdio.h> #include<stdlib.h> int main() { int *p; p = (int *)malloc(20); printf("%d\n", sizeof(p)); free(p); return 0; } … Read more

advertisement
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He is Linux Kernel Developer & SAN Architect and is passionate about competency developments in these areas. He lives in Bangalore and delivers focused training sessions to IT professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux Networking, Linux Storage, Advanced C Programming, SAN Storage Technologies, SCSI Internals & Storage Protocols such as iSCSI & Fiber Channel. Stay connected with him @ LinkedIn | Youtube | Instagram | Facebook | Twitter