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

Test

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

Test

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

Basic Concepts

1. What is C programming language?


2. What are the key features of C language?
3. Explain the structure of a C program.
4. Define a variable in C.
5. What are the different data types in C?

Control Structures

9. Explain the different types of loops in C.


10. What is the difference between while and do-while loop?
11. How does the switch statement work in C?

Functions

13. What is a function in C?

Arrays and Strings

16. What is an array in C? How do you declare and initialize it?


17. What is a multi-dimensional array? Give an example.
18. How do you define a string in C?

Pointers

19. What is a pointer in C? How is it declared?


20. Explain pointer arithmetic.
21. What are the advantages of using pointers in C?

Structures and Unions

23. What is a structure in C? How is it different from an array?


24. How do you declare and initialize a structure?
25. What is a union in C? How is it different from a structure?

File Handling

29. How do you open and close a file in C?


30. What are the different modes for opening a file in C?
31. Explain the difference between scanf() and fgets().

Miscellaneous

35. What is the difference between == and = in C?


36. What are header files in C?

Practical Questions on C Programming

Basic Concepts

1. Write a C program to print "Hello, World!" to the console.


2. Write a program that takes two integers as input and prints their sum.

Control Structures

3. Write a program to find the largest of three numbers using an if-else statement.
4. Write a C program to print the first 10 natural numbers using a for loop.
5. Write a program to demonstrate the use of the switch statement by creating a simple
calculator that performs addition, subtraction, multiplication, and division based on user
input.

Arrays and Strings

7. Write a program to initialize an array of 10 integers and print the elements using a for loop.
8. Write a C program to reverse a string using a for loop.

Pointers

9. Write a program to demonstrate the use of pointers by declaring a pointer to an integer,


assigning it the address of a variable, and printing the value and address of the variable using
the pointer.

Structures and Unions

10. Define a structure Person with members name, age, and salary. Write a program to declare
a Person variable and initialize it. Print the details of the person.

File Handling

11. Write a program to create a file and write "Hello, World!" into it. Then open the file and read
the content to print it

Basic Concepts

6. What is C programming language?


7. What are the key features of C language?
8. Explain the structure of a C program.
9. Define a variable in C.
10. What are the different data types in C?

Control Structures

12. Explain the different types of loops in C.


13. What is the difference between while and do-while loop?
14. How does the switch statement work in C?

Functions

14. What is a function in C?

Arrays and Strings

19. What is an array in C? How do you declare and initialize it?


20. What is a multi-dimensional array? Give an example.
21. How do you define a string in C?

Pointers

22. What is a pointer in C? How is it declared?


23. Explain pointer arithmetic.
24. What are the advantages of using pointers in C?

Structures and Unions

26. What is a structure in C? How is it different from an array?


27. How do you declare and initialize a structure?
28. What is a union in C? How is it different from a structure?

File Handling

32. How do you open and close a file in C?


33. What are the different modes for opening a file in C?
34. Explain the difference between scanf() and fgets().

Miscellaneous

37. What is the difference between == and = in C?


38. What are header files in C?

Practical Questions on C Programming


Basic Concepts

3. Write a C program to print "Hello, World!" to the console.


4. Write a program that takes two integers as input and prints their sum.

Control Structures

6. Write a program to find the largest of three numbers using an if-else statement.
7. Write a C program to print the first 10 natural numbers using a for loop.
8. Write a program to demonstrate the use of the switch statement by creating a simple
calculator that performs addition, subtraction, multiplication, and division based on user
input.

Arrays and Strings

9. Write a program to initialize an array of 10 integers and print the elements using a for loop.
10. Write a C program to reverse a string using a for loop.

Pointers

10. Write a program to demonstrate the use of pointers by declaring a pointer to an integer,
assigning it the address of a variable, and printing the value and address of the variable using
the pointer.

Structures and Unions

11. Define a structure Person with members name, age, and salary. Write a program to declare
a Person variable and initialize it. Print the details of the person.

File Handling

12. Write a program to create a file and write "Hello, World!" into it. Then open the file and read
the content to print it

You might also like