MCQOPTIONS
Saved Bookmarks
This section includes 7 Mcqs, each offering curated multiple-choice questions to sharpen your C Interview knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
What is typedef declaration? |
| A. | Does not create a new type |
| B. | It merely adds a new name for some existing type |
| C. | Does not create a new type, It merely adds a new name for some existing type |
| D. | None of the mentioned |
| Answer» D. None of the mentioned | |
| 2. |
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 pointer |
| Answer» B. error | |
| 3. |
Which of the following may create problem in the typedef program? |
| A. | ; |
| B. | printf/scanf |
| C. | Arithmetic operators |
| D. | All of the mentioned |
| Answer» E. | |
| 4. |
Which of the given option is the correct method for initialization? |
| A. | *string *p = “Hello”; |
| B. | string p = “Hello”; |
| C. | *string p = ‘A’; |
| D. | Not more than one space should be given when using typedefView Answer |
| Answer» C. *string p = ‘A’; | |
| 5. |
Which option should be selected to work the following C expression? |
| A. | typedef char [] string; |
| B. | typedef char *string; |
| C. | typedef char [] string; and typedef char *string; |
| D. | Such expression cannot be generated in CView Answer |
| Answer» C. typedef char [] string; and typedef char *string; | |
| 6. |
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 mentioned |
| Answer» B. typedef defined substitutes can be redefined again. (Eg: typedef char a; typedef int a;) | |
| 7. |
*string *p = “Hello”;$ |
| A. | string p = “Hello”; |
| B. | *string p = ‘A’; |
| C. | Not more than one space should be given when using typedef |
| Answer» D. | |