Interview Questions for C

What’s going to get printed within the below program? #include #include primary() printf(-%d-, strlen(str) )

a. 8 b.9 c. 10 d. Compile time Error

Answer : b

2. Discover the creation of the next program? #include primary() printf(-%s-, str)

a. Gyantonic b. c. Gyantonic d. Nothing get printed.

Answer : )

3. Discover the creation of the next program? #include primary()

a. Gyantonic b. Hzboupojd c. Garbage Value d. Compile Time Error

Answer:b

4. Will the below program compile effectively? #include struct abc

primary()

a. Yes b. No

Answer: a

5. What would be the creation of the below program? #include struct abc

primary()

a. 10 10 b. 10 GarbageValue c. Garbagevalue 10 d. Compilation Error

Answer : )

6. Discover the creation of the below program? #include struct abc

primary()

a. 10 10 b. 10 GarbageValue c. Compilation Error d. Runtime Error

Answer : c

7. Automatically all local variables really are a. auto b. static c. register d. extern

Answer : a

8. Can exterior variables be initialized throughout their declaration. a. Yes b. No

Answer : b

9. What’s going to get printed in th below code? #include primary() int i = 10

a. b. 1 c. 10 d. Compilation Error

Answer : c

10. Are we able to connect to the address of the register variable in C? a. Yes b. No

Answer : b

for Campus Positioning Preparation

Leave a comment

Your email address will not be published. Required fields are marked *