0% found this document useful (0 votes)
15 views3 pages

INTRODUCTION_TO_C_PROGRAMMING_ Question Bank_Unit1_to_3_&_Lab_Program_List

The document outlines a comprehensive introduction to C programming, covering fundamental concepts such as data types, operators, control structures, arrays, functions, structures, pointers, and file operations. It includes detailed explanations, examples, and programming tasks for each topic, aimed at providing a solid foundation in C programming. Additionally, it features lab programs that reinforce theoretical knowledge through practical coding exercises.

Uploaded by

prasadrandi97
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)
15 views3 pages

INTRODUCTION_TO_C_PROGRAMMING_ Question Bank_Unit1_to_3_&_Lab_Program_List

The document outlines a comprehensive introduction to C programming, covering fundamental concepts such as data types, operators, control structures, arrays, functions, structures, pointers, and file operations. It includes detailed explanations, examples, and programming tasks for each topic, aimed at providing a solid foundation in C programming. Additionally, it features lab programs that reinforce theoretical knowledge through practical coding exercises.

Uploaded by

prasadrandi97
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/ 3

INTRODUCTION TO C PROGRAMMING (CS1004-1)

Unit 1
1. Briefly describe the four fundamental data types that ‘C’ supports.
2. List and explain types of operators in in C.
3. Explain binary operators in C.
4. Discuss Conditional operator in C with example.
5. List and explain types of logical operator with example.
6. List and explain types of relational operator with example
7. Explain Bitwise operators with example.
8. Illustrate Right shift and Left Shift operator with example.
9. Differentiate pre Increment and post increment operator.
10. Explain type conversion in C.
11. Describe the significance of operator precedence and associativity in determining
the correct evaluation of arithmetic expressions. Explain with an example.
12. Evaluate the following expressions step by step by considering the operator
precedence and associativity :
a. 7 * (5 + 15) / (2 * 5) – 3
b. (10 + 5) * 2 - 20 / (4 % 3)
c. -7*5/(3+2*3/12+8)+15*( 10 / 5)
d. a-b/3+c*2-1 where a = 9, b =12, and c=3
e. 6*2/(2+1*2/3 +6)+8*(8/4)
13. Explain the syntax of simple if, if else with syntax, flowchart and example.
14. Explain the syntax of switch and else-if ladder with syntax, flowchart and example..
15. Explain break, continue and goto statement with example and their use.
16. Write a program to find greatest number among three numbers using nested if else.
17. What are loop control structures? Explain While, do-while and for loops with syntax
and flow Diagram.
18. Develop a C program to simulate the use of Simple calculator using switch.
19. Differentiate between entry-controlled loop and exit controlled loop.
20. Write a C program to check if a number is even or odd.
21. Write a C program to calculate sum of n natural numbers.

Unit 2
1. With example explain different ways to initialize 1-dimensional arrays in C.
2. Design a C program to sort n integer elements in ascending order.
3. Illustrate with example to declare and initialize 2-D array in C.
4. Design a C program to find smallest and largest element in a given 3x3 matrix of
integer elements.
5. What do you mean by string? How string is represented in C.
6. Explain how character arrays/strings are declared and initialized in C with an
example.
7. Explain any five string manipulation functions with their syntax and give example for
each.
8. Write a C program to perform the following tasks using built-in string functions:
a. Reverse a given string.
b. Determine the length of the given string.
9. Define Functions? Discuss the advantages of using Function in any
application/program.
10. Compare and Contrast User defined Functions and Predefined functions.
11. Differentiate between User defined functions and Library Functions.
12. Determine the various elements of User defined functions with an example.
13. llustrate the different categories of functions with an example.
14. Explain the different types of Function Call.
15. Compare and contrast Call by Value and Call by Reference.
16. Using the concept of functions, Write a C Program for the following
a. To sort the given array elements using bubble sort technique
b. To sort the given array elements using selection sort technique
c. To search a given key element using Linear Search Technique.

Unit 3
1. What is a Structure? Explain the syntax of a structure with an example.
2. Which are the 2 ways in which structure variables can be created? Explain with
examples.
3. Explain the significance of dot operator in accessing structure members.
4. How can you copy one structure to another? Explain.
5. Explain how you can compare 2 structure variables.
6. Create a structure called Employee with the fields: Name,Branch and Experience and
input the details of 2 employees.
7. Create a structure with the name Student which has the following fields: USN, Name,
and Branch. Input the details of 10 students.
8. Define a pointer. List out the benefits of using pointers in C
9. Explain how pointers are declared and initialised with general syntax and example
10. Considering an example write the difference between & operator and * operator.
11. Write a program to add two numbers using pointers
12. Write a C program to read N integers into an array A and find the sum of elements
using pointers
13. Write a C program using pointers to perform the following:
a. display the address of a variable
b. display the value stored at the address
14. Define a file. List and explain the functions used in C to perform basic file operations
15. Develop a C program that reads user input from the console, stores the input in a
file, and then reads and displays the stored content on the terminal.
16. Explain the various file operations with general syntax and an example.
17. Write the general syntax of fopen function and explain the different file Opening
modes
18. Write the syntax and explain the following: fopen() and fclose().
19. Write a C program to perform input and output operation on file using getc() and
putc().
20. Write a C program to copy contents of one file to another file.
21. Write a C program to perform reading and writing from file using fprintf() and
fscanf().
Introduction to C Programming - Lab Programs

1. Write a C program to find the roots of a quadratic equation ax2+bx+c=0


2. Write a C program to find the sum of all the digits and occurrence of a digit in the
number.
3. Write a C program to find the GCD and LCM of given two numbers using Euclid’s
method.
4. Write a C program check whether the given number is prime or not.
5. Write a C program to find if a given string is a palindrome or not using string
manipulation functions.
6. Write a C program to input N real numbers in 1-D array. Compute mean, variance
and Standard Deviation. Mean= sum/N, Variance = Σ (Xi-mean) 2 /N, STD Deviation=
√variance.
7. Write a C program to read N integers into an array A and find the sum of elements
using pointers.
8. Write a C program to copy contents of one file to another file.
9. Write a C program to perform a binary search for a given key integer in a single
dimensional array of numbers in ascending order and report success or failure in the
form of a suitable message.
10. Write a C program to input N integer numbers into a single dimension array, sort
them in to ascending order using selection sort technique, and then to print both the
given array and the sorted array with suitable headings.
11. Write a C program to transpose a matrix of order M x N and find the trace of the
resultant matrix.
12. Write a C program to perform a linear search for a given key integer in a single
dimensional array of numbers and report success or failure in the form of a suitable
message using functions.
13. Write a C program to enter the information like name, register number, marks in 6
subjects of student using structure, and find the average, display grade based on
average of a student using following table
Average - Grade
80 -100 Distinction
60-79 First Class
40 -59 Second Class
<40 Fail

You might also like