Interview Questions On C (Part I) : Academy of Technology

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

ACADEMY OF TECHNOLOGY

Placement 2020-21
Interview Questions on C (Part I)

Data Types and Operators


1. What do you mean by assembler, compiler and interpreter?

2. Differentiate between high-level, middle-level and low-level language.

3. What is the best way to comment out a section of code that contains comments?

4. What is an unsigned integer constant? What is the significance of declaring a constant


unsigned?

5. What is the importance of flowchart?

6. What is the use of ASCII?

7. What are escape sequence characters? What is the purpose of use them?

8. What do you mean by overflow and underflow of data?

9. What is an lvalue?

10. What is an rvalue?

11. Is left-to-right or right-to-left order guaranteed for operator precedence?

12. What is the difference between ++var and var++?

13. What does the modulus operator do?

14. Where in memory are my variables stored?

15. Do variables need to be initialized?

16. When should the register modifier be used? Does it really help?

17. When should the volatile modifier be used?

18. Can a variable be both const and volatile?

19. How reliable are floating-point comparisons?

20. What is operator promotion?


21. When should a type cast be used?

22. When should a type cast not be used?

23. Is it acceptable to declare/define a variable in a C header?

24. What is the difference between declaring a variable and defining a variable?

25. What is the benefit of using const for declaring constants?

26. What is the concatenation operator?

27. How to test whether a no. is power of 2 or not in O(1).

28. How to check whether a no. is even or odd without using % operation.

29. How to add two integers without using ‘+’ operator.

30. How to find the smallest of three integers without using any of the comparison operators.

31. How to find maximum and minimum of two numbers in a single line without using any
condition and loop.

32. Is it possible to use %( modulo division operator) on floating point data?

33. Explain mixed mode arithmetic with an example.

34. Explain the output of the following code.

35. Explain precedence and associativity with an example.

36. Explain the output of the following program.

37. What is the difference between logical AND and bitwise AND operator.

Page 2

You might also like