C Programming 2

COEP
Lets Crack Online Exam

IT Interview Exam Questions: C Programming 2 (IT Interview Exam Question, IT Campus Placement)

Subject: C Programming 2

Part 2: List for questions and answers of C Language

 

Q1. What is use of \r in c

a) used to insert a vertical tab

b) used to insert a tab

c) places cursor at the end of line

d) places cursor at the start of line

 

Q2. select Output of following program : float x = 10.7; int i;i = (int) x; print i;

a) null

b) error

c) 10

d) garbage value

 

Q3. Which one of the following is not a reserved keyword for C?

a) auto

b) case

c) main

d) default

 

Q4. C variable cannot start with

a) A number

b) A special symbol other than underscore

c) Both of the above

d) An alphabet

 

Q5. Which one of the following is not a valid identifier?

a) _Infraengineeringskills

b) 1Infraengineeringskills

c) Infraengineeringskills_

d) Infraengineeringskills1

 

Q6. Which is the only function all C programs must contain?

a) start()

b) system()

c) main()

d) printf() 

 

Q7. Which of the following is not a correct variable type?

a) float

b) real

c) int

d) double

 

Q8. select correct statement “My salary was increased by 15%” Select the statement

a) printf(“My salary was increased by 15/%!”);

b) printf(“My salary was increased by 15%!”);

c) printf(“My salary was increased by 15’%’!”);

d) printf(“My salary was increased by 15%%!”);

 

Q9. What is the purpose of getc()

a) read a character from STDIN

b) read a character from a file

c) read all file

d) read file random

 

Q10. Which operator in c can’t be overloaded

a) %

b) +

c) ::

d) –

 

Q11. Which operator has the highest priority

a) ()

b) []

c) *

d) /

 

Q12. A member is a

a) Variable in a structure

b) Datatype of structure

c) Structure pointer

d) None of above

 

Q13. UML meaning is

a) Unique modeling language

b) Unified modeling language

c) Unified modern language

d) Unified master laqnguage 

 

Q14. printf() belongs to which library of c

a) stdlib.h

b) stdio.h

c) stdout.h

d) stdoutput.h

 

Q15. What is correct order of precedence in C

a) Addition, Division, Modulus

b) Addition, Modulus, Division

c) Multiplication, Substration, Modulus

d) Modulus, Multiplication, Substration

 

Q16. What is true about fputs function

a) write to a file

b) takes two parameters

c) requires a file pointer

d) all of above

 

Q17. C99 standard guarantess uniqueness of _____ characters for external names

a) 31

b) 6

c) 12

d) 14

 

Q18. Which of the following is not a valid variable name declaration?

a) int __a3;

b) int __3a;

c) int __A3;

d) None of the mentioned

 

Q19. Which of the following is not a valid variable name declaration?

a) int _a3;

b) int a_3;

c) int 3_a;

d) int _3a 

 

Q20. Variable name resolving (number of significant characters for uniqueness of variable) depends on

a) Compiler and linker implementations

b) Assemblers and loaders implementations

c) C language

d) None 

 

Part 2: List for questions and answers of C Language

 

Q1. Answer: d

 

Q2. Answer: c

 

Q3. Answer: c

 

Q4. Answer: c

 

Q5. Answer: a

 

Q6. Answer: c

 

Q7. Answer: b

 

Q8. Answer: d

 

Q9. Answer: b

 

Q10. Answer: c

 

Q11. Answer: a

 

Q12. Answer: b

 

Q13. Answer: b

 

Q14. Answer: b

 

Q15. Answer: d

 

Q16. Answer: d

 

Q17. Answer: a

 

Q18. Answer: d

 

Q19. Answer: c

 

Q20. Answer: a