0% found this document useful (0 votes)
11 views

C Programming Unit Wise Questions

The document outlines a series of theory and programming questions organized by units related to C programming. Each unit covers different topics such as the basic structure of C programs, control structures, arrays and strings, functions and pointers, and structures and file management. The questions aim to assess understanding and practical application of C programming concepts.

Uploaded by

kotra shankar
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)
11 views

C Programming Unit Wise Questions

The document outlines a series of theory and programming questions organized by units related to C programming. Each unit covers different topics such as the basic structure of C programs, control structures, arrays and strings, functions and pointers, and structures and file management. The questions aim to assess understanding and practical application of C programming concepts.

Uploaded by

kotra shankar
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/ 2

C Programming Unit Wise Questions

UNIT 1: Introduction to C Programming


Theory Questions:
1. Explain the basic structure of a C program with a suitable example.
2. What are tokens in C? Explain different types of tokens with examples.
3. Differentiate between constants and variables in C programming.
4. Explain various data types available in C with their memory requirements.
5. Describe the importance of type conversion in expressions. What are the rules for
type conversion?
6. Compare and contrast different formatted input/output functions in C.

Programming Questions:
1. Write a C program to demonstrate the use of all arithmetic operators and their
precedence.
2. Create a program to convert temperature from Celsius to Fahrenheit using
appropriate data types.
3. Write a program to calculate simple interest using formatted input and output
operations.
4. Develop a program to demonstrate implicit and explicit type conversion.

UNIT 2: Control Structures


Theory Questions:
1. Compare the working of while, do-while, and for loops with suitable examples.
2. Explain the difference between break and continue statements in loops.
3. Describe the syntax and working of switch statement. What are its limitations?
4. What is the significance of nested if-else statements? Explain with an example.

Programming Questions:
1. Write a program to check whether a given number is prime using appropriate
control structures.
2. Develop a program to print Floyd’s triangle using nested loops.
3. Create a program to find factorial of a number using both iterative and recursive
approaches.
4. Write a program to demonstrate the use of goto statement and explain why it
should be avoided.

UNIT 3: Arrays and Strings


Theory Questions:
1. How are 2D arrays stored in memory? Explain with an example.
2. Explain the difference between character arrays and strings in C.
3. Describe various string handling functions available in C.
4. What is the significance of null character in strings?

Programming Questions:
1. Write a program to perform matrix multiplication using 2D arrays.
2. Develop a program to sort an array using bubble sort algorithm.
3. Create a program to perform common string operations without using built-in
functions.
4. Write a program to check if a given string is palindrome.

UNIT 4: Functions and Pointers


Theory Questions:
1. Explain the difference between call by value and call by reference with examples.
2. What is recursion? How is it different from iteration?
3. Describe the scope and lifetime of variables in C.
4. Explain dynamic memory allocation functions with their usage.

Programming Questions:
1. Write a program to find GCD of two numbers using recursive functions.
2. Develop a program to demonstrate pointer arithmetic and array access using
pointers.
3. Create a program to implement dynamic memory allocation for matrix operations.
4. Write a function to swap two numbers using pointers.

UNIT 5: Structures and File Management


Theory Questions:
1. What is a structure? How is it different from an array?
2. Explain various file opening modes in C with their purposes.
3. Describe the process of error handling in file operations.
4. What is the difference between text files and binary files?

Programming Questions:
1. Write a program to maintain student records using structures and perform
operations like add, delete, and display.
2. Develop a program to read data from one file and write it to another file.
3. Create a program to demonstrate random access in files using fseek().
4. Write a program to implement a basic address book using structures and file
handling.

You might also like