Which of the following is the correct way to declare a function pointer where ‘pointer’ is the pointer to the function and ‘function; is the name of the function
Correct
Incorrect
Question 2 of 10
2. Question
In what way are both declarations different from each other int display(); extern int display();
Correct
Incorrect
Question 3 of 10
3. Question
Predict the output of the following segment of code: // ASSUME 64-bit compiler // Add stdio.h and stdlib.h header file in below code
int main() { struct DataFlair { int value; struct DataFlair *link; }; struct DataFlair *x, *y; x = (struct DataFlair *) malloc(sizeof(struct DataFlair)); y = (struct DataFlair *) malloc(sizeof(struct DataFlair)); printf(“%ld %ld”,sizeof(x),sizeof(y)); return 0; }
Correct
Incorrect
Question 4 of 10
4. Question
Which of the following statements is true about structures and unions?
Correct
Incorrect
Question 5 of 10
5. Question
Predict the output of the following segment of code: // ASSUME 64-bit compiler // Add stdio.h header file in below code
struct DataFlair { int a; float b; char array[20]; }d; int main() { printf(“%ld”, sizeof(struct DataFlair)); return 0; }
Correct
Incorrect
Question 6 of 10
6. Question
Which operator is used to check if a particular bit is on or off?
Correct
Incorrect
Question 7 of 10
7. Question
Predict the output of the following segment of code:If n and p are unsigned int variables in a C program. We wish to set p to nC3. If n is large, which of the following statements is most likely to set p correctly?
Correct
Incorrect
Question 8 of 10
8. Question
Predict the output of the following segment of code: // Add stdio.h header file in below code
DataFlair Team creates expert-level guides on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our goal is to empower learners with easy-to-understand content. Explore our resources for career growth and practical learning.
good