InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Which of the following is not possible under any scenario?(a) s1 = &s2;(b) s1 = s2;(c) (*s1).number = 10;(d) None of the mentionedThe question was asked by my college professor while I was bunking the class.My query is from Structures and Functions in chapter Structures, Unions and Bit-Fields in C of C |
|
Answer» RIGHT CHOICE is (d) NONE of the mentioned Easiest EXPLANATION - None. |
|
| 2. |
The size of a union is determined by the size of the __________(a) First member in the union(b) Last member in the union(c) Biggest member in the union(d) Sum of the sizes of all membersThe question was posed to me in quiz.My enquiry is from Unions in section Structures, Unions and Bit-Fields in C of C |
|
Answer» CORRECT CHOICE is (c) Biggest MEMBER in the union The BEST explanation: None. |
|
| 3. |
Which of the following are themselves a collection of different data types?(a) string(b) structures(c) char(d) all of the mentionedThe question was posed to me in an interview for job.My query is from Basics of Structures in chapter Structures, Unions and Bit-Fields in C of C |
|
Answer» Correct OPTION is (B) structures |
|
| 4. |
Which of the following statement is true?(a) Install function uses lookup(b) lookup function uses install(c) Install and lookup function work independently(d) None of the mentionedThis question was addressed to me in examination.Question is from Table Lookup topic in portion Structures, Unions and Bit-Fields in C of C |
|
Answer» CORRECT CHOICE is (a) Install FUNCTION uses lookup Easy explanation - None. |
|
| 5. |
typedef int (*PFI)(char *, char *)creates ___________(a) type PFI, for pointer to function (of two char * arguments) returning int(b) error(c) type PFI, function (of two char * arguments) returning int(d) type PFI, for pointerI had been asked this question in an interview for internship.My doubt stems from Typedefs topic in division Structures, Unions and Bit-Fields in C of C |
|
Answer» CORRECT choice is (a) type PFI, for pointer to function (of two CHAR * arguments) RETURNING int Best explanation: NONE. |
|
| 6. |
Which function is responsible for recording the name “s” and the replacement text “t” in a table?(a) install(s, t);(b) fix(s, t);(c) setup(s, t);(d) settle(s, t);The question was asked in an internship interview.The doubt is from Table Lookup in division Structures, Unions and Bit-Fields in C of C |
|
Answer» The CORRECT CHOICE is (a) INSTALL(s, t); |
|
| 7. |
Which of the following may create problem in the typedef program?(a) ;(b) printf/scanf(c) Arithmetic operators(d) All of the mentionedI had been asked this question in final exam.The origin of the question is Typedefs in section Structures, Unions and Bit-Fields in C of C |
|
Answer» CORRECT CHOICE is (d) All of the mentioned Best EXPLANATION: NONE. |
|
| 8. |
What happens when install(s, t) finds that the name being installed is already present in the table?(a) It doesn’t modify the name in the table(b) It modifies the name with new definition(c) It modifies off the new definition has higher priority(d) It creates a new table and add the new definition in itThis question was addressed to me in an interview for job.My doubt stems from Table Lookup topic in portion Structures, Unions and Bit-Fields in C of C |
|
Answer» The correct option is (B) It MODIFIES the NAME with new definition |
|
| 9. |
Which of the following return-type cannot be used for a function in C?(a) char *(b) struct(c) void(d) none of the mentionedThis question was posed to me in a national level competition.This interesting question is from Structures and Functions in chapter Structures, Unions and Bit-Fields in C of C |
|
Answer» RIGHT OPTION is (d) NONE of the mentioned The BEST I can EXPLAIN: None. |
|
| 10. |
Which of the following reduces the size of a structure?(a) union(b) bit-fields(c) malloc(d) none of the mentionedI got this question during an interview.I need to ask this question from Bit-fields in chapter Structures, Unions and Bit-Fields in C of C |
| Answer» | |
| 11. |
Which of the following is false about typedef?(a) typedef follow scope rules(b) typedef defined substitutes can be redefined again. (Eg: typedef char a; typedef int a;)(c) You cannot typedef a typedef with other term(d) All of the mentionedThis question was addressed to me during an internship interview.This question is from Typedefs topic in chapter Structures, Unions and Bit-Fields in C of C |
|
Answer» The correct CHOICE is (b) TYPEDEF DEFINED substitutes can be redefined again. (EG: typedef char a; typedef int a;) |
|
| 12. |
Which algorithm is used for searching in the table?(a) List search(b) Informed search(c) Hash search(d) Adversarial searchThe question was posed to me in quiz.The query is from Table Lookup topic in section Structures, Unions and Bit-Fields in C of C |
|
Answer» CORRECT ANSWER is (C) HASH search Explanation: NONE. |
|
| 13. |
Which of the following operation is illegal in structures?(a) Typecasting of structure(b) Pointer to a variable of the same structure(c) Dynamic allocation of memory for structure(d) All of the mentionedThis question was addressed to me in an interview for job.This is a very interesting question from Structures and Functions topic in portion Structures, Unions and Bit-Fields in C of C |
|
Answer» Correct option is (a) TYPECASTING of structure |
|
| 14. |
Which function is responsible for searching in the table? (For #define IN 1, the name IN and replacement text 1 are stored in a “table”)(a) findout(s);(b) lookup(s);(c) find(s);(d) lookfor(s);I got this question in quiz.The above asked question is from Table Lookup topic in portion Structures, Unions and Bit-Fields in C of C |
|
Answer» Correct ANSWER is (B) lookup(s); |
|
| 15. |
Which of the following uses structure?(a) Array of structures(b) Linked Lists(c) Binary Tree(d) All of the mentionedThe question was asked in my homework.I'd like to ask this question from Arrays of Structures topic in division Structures, Unions and Bit-Fields in C of C |
|
Answer» CORRECT CHOICE is (d) All of the mentioned The EXPLANATION is: NONE. |
|
| 16. |
Which of the following is not allowed?(a) Arrays of bit fields(b) Pointers to bit fields(c) Functions returning bit fields(d) None of the mentionedThe question was asked in an online quiz.Asked question is from Bit-fields in portion Structures, Unions and Bit-Fields in C of C |
|
Answer» RIGHT OPTION is (d) NONE of the mentioned To EXPLAIN: None. |
|
| 17. |
Which of the following data types are accepted while declaring bit-fields?(a) char(b) float(c) double(d) none of the mentionedThe question was posed to me in an interview.My query is from Bit-fields topic in portion Structures, Unions and Bit-Fields in C of C |
| Answer» | |