Structures
- Presence of code like “s.t.b = 100” indicates __________.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
Structure
- Which of the following operation is illegal in structures?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
Typecasting of structure
- Which of the following is not possible under any scenario?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: E
n1 = n2; or (*n1).number = 10; and n1 = &n2; are not possible under any scenario.
- What will be the output of the following C code?
#include <stdio.h>
struct test
{
int num;
} t;
void func(struct test t)
{
t.num = 125;
printf("%d ", t.num);
}
main()
{
func(t);
printf("%d ", t.num);
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
125 0
- Which of the following return-type cannot be used for a function in C?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: E
struct, void and char * return-type cannot be used for a function in C.