0% found this document useful (0 votes)
45 views4 pages

Theory Questions

Uploaded by

unicornpeppy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views4 pages

Theory Questions

Uploaded by

unicornpeppy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Section 1: Basics of Programming and C Language

1. Define a programming language.

2. What is a compiler? Explain its role in program execution.

3. Explain the difference between an interpreter and a compiler.

4. What are the phases of program development?

5. Define variable, constant, and data types in C.

6. Explain the concept of keywords and identifiers with examples.

7. What are the basic input and output functions in C?

8. Differentiate between printf() and scanf() functions.

9. Write a short note on escape sequences in C.

10. What is a flowchart? Explain its significance.

Section 2: Control Structures

11. What are decision-making statements in C? Explain with examples.

12. Differentiate between if-else and switch-case statements.

13. Write the syntax of a for loop. When is it used?

14. What is the difference between while and do-while loops?

15. Explain break and continue statements with examples.

16. What are nested loops? Provide an example.

17. Write a short note on the goto statement in C.

18. Explain the concept of an infinite loop. Provide one example.

19. What are conditional operators? Write an example.

20. Explain the ternary operator with syntax and example.

Section 3: Arrays and Strings

21. Define an array. How is it declared and initialized in C?

22. Explain the difference between one-dimensional and two-dimensional arrays.

23. Write a note on multidimensional arrays with an example.

24. What is the significance of array indexing?

25. Explain how strings are stored and manipulated in C.

26. Write a short note on string functions like strlen, strcpy, and strcat.
27. Differentiate between character arrays and strings in C.

28. What is a null character (‘\0’)? How is it used in strings?

29. Explain how to pass arrays to a function.

30. Write an example of a program to reverse a string using arrays.

Section 4: Functions

31. Define a function. What are its components?

32. Differentiate between call by value and call by reference.

33. Explain the concept of function prototypes in C.

34. What is recursion? Write an example.

35. Write the difference between library functions and user-defined functions.

36. Explain return statements in a function.

37. What is the significance of the void data type in functions?

38. What are inline functions? Give an example.

39. Explain the concept of function overloading with an example.

40. What is the scope and lifetime of a variable?

Section 5: Pointers

41. What is a pointer? How is it declared?

42. Explain the relationship between pointers and arrays.

43. What is the NULL pointer?

44. Explain pointer arithmetic with examples.

45. Write a short note on dynamic memory allocation using pointers.

46. What is the difference between malloc() and calloc()?

47. Explain the concept of dangling pointers.

48. How can pointers be used to pass arguments to a function?

49. Write a note on pointers to functions.

50. How is memory deallocated in C? Explain with free().

Section 6: Structures and Unions

51. Define a structure. How is it different from an array?


52. Explain how to declare and access structure members.

53. What is the sizeof operator? How is it used for structures?

54. What is a nested structure? Explain with an example.

55. Differentiate between structure and union.

56. Write a program to store and display details of students using structures.

57. Explain the concept of enumerated data types.

58. How is memory allocated for unions?

59. What is the difference between typedef and define in C?

60. Write a note on structure padding.

Section 7: File Handling

61. What is file handling? Why is it required in programming?

62. Explain the types of files: text files and binary files.

63. Write the syntax of fopen(), fclose(), and fprintf().

64. What is the difference between getc(), putc(), and fprintf()?

65. Explain file modes in C programming.

66. Write a program to write and read a file in C.

67. What is the significance of fseek() and ftell() functions?

68. Explain the EOF (End of File) indicator.

69. Write a note on command-line arguments.

70. What are file pointers? Explain with examples.

Section 9: Object-Oriented Programming Concepts

71. Define class and object with examples.

72. Differentiate between inheritance and polymorphism.

73. What is encapsulation? Explain its importance.

74. Define constructor and destructor with examples.

75. What is method overloading and method overriding?

76. Write a short note on abstraction.

77. Explain the concept of access specifiers in OOP.

78. What are abstract classes and interfaces?

You might also like