C Programming - Basics of Structures
Question 1
|
Which of the following are themselves a collection of different data types?
string
| |
structures
| |
char
| |
All of the mentioned
|
Question 2
|
User-defined data type can be derived by___________.
struct
| |
enum
| |
typedef
| |
All of the mentioned
|
Question 3
|
Which operator connects the structure name to its member name?
-
| |
<-
| |
.
| |
Both (b) and (c)
|
Question 4
|
Which of the following cannot be a structure member?
Another structure
| |
function
| |
Array
| |
None of the mentioned
|
Question 5
|
Which of the following structure declaration will throw an error?
struct temp{}s; main(){}
| |
struct temp{}; struct temp s; main(){}
| |
struct temp s; struct temp{}; main(){}
| |
None of the mentioned
|
Question 6
|
What is the output of this C code?
Compile time error
| |
Nothing
| |
hello
| |
Varies
|
Question 7
|
What is the output of this C code?
Nothing
| |
Compile time error
| |
hello
| |
Varies
|
Question 8
|
What is the output of this C code?
Nothing
| |
hello
| |
Compile time error
| |
Varies
|
Question 9
|
. What is the output of this C code?
Nothing
| |
Compile time error
| |
Junk
| |
8
|
Question 10
|
Can the above code be compiled successfully?
Yes
| |
No
| |
Depends on the standard
| |
Depends on the platform
|
Question 11
|
What is the output of this C code?
Nothing
| |
Compile time error
| |
Junk
| |
8
|
Question 12
|
Number of bytes in memory taken by the below structure is?
Multiple of integer size
| |
integer size+character size
| |
Depends on the platform
| |
Multiple of word size
|
Question 13
|
What is the output of this C code?
Compile time error
| |
10
| |
Undefined behaviour
| |
Segmentation fault
|
Question 14
|
What is the output of this C code?
Compile time error
| |
10 10
| |
Depends on the standard
| |
Depends on the compiler
|
Question 15
|
What is the output of this C code?
Compile time error
| |
10 10
| |
Depends on the standard
| |
Depends on the compiler
|
Question 16
|
What is the output of this C code?
Compile time error
| |
0.000000 10
| |
Somegarbage value 10
| |
0 10
|
Question 17
|
What is the output of this C code(according to C99 standard)?
3.000000
| |
Compile time error
| |
Undefined behaviour
| |
1.000000
|
Question 18
|
What is the output of this C code(according to C99 standard)?
3.000000
| |
0.000000
| |
Compile time error
| |
Undefined behaviour
|
Question 19
|
What is the output of this C code(according to C99 standard)?
0.000000
| |
Somegarbagevalue
| |
Compile time error
| |
None of the mentioned
|
Check Your Answers:
1. B
2. D
3. C
4. B
5. D
6. A
7. B
8. C
9. D
10. C
11. B
12. B
13. A
14. A
15. B
16. B
17. A
18. B
19. A
0 comments:
Post a Comment