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

C PROGRAMMING Teminal Question

Uploaded by

premrathod038
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)
4 views4 pages

C PROGRAMMING Teminal Question

Uploaded by

premrathod038
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

C PROGRAMMING

UNIT 1:
1. Explain the history of C language. These are sample terminal questions
2. What are the advantages of C language? shared only for your reference. Please
do not rely on them completely. You are
3. What are the major components of a C program? encouraged to do your own research and
4. What significance is attached to the function main? prepare accordingly. They are meant
UNIT 2: only to give you a general idea of the
1. Distinguish between signed and unsigned integers. exam pattern. on the subject

2. What are the components of declaration statement?


3. State the rules for naming a variable in C.
4. Clarify the different constants present in the C programming language.?
UNIT 3:
1. Explain the role of format specifiers in the printf function in C. Provide examples of different format
specifiers and their corresponding data types.
2. Describe how the scanf function is used for input in C. Include examples with different format specifiers
and discuss the importance of using the correct specifiers for variable types.
3. Discuss the significance of the & (ampersand) operator in the context of the scanf function. Provide an
example to illustrate its usage.
UNIT 4:
1. If i=10 and j=12, what are the values of c and d after executing the following program segment:
i++; c=j++ + i; d=++i + j++;
2. Suppose that x, y and z are integer variables which have been assigned the values 2, 3 and 4, respectively.
Evaluate the following expression and determine the value of x.
x *= -2 * (y + z) / 3
3. Suppose that i is an integer variable whose value is 7 and c is a character variable that represents the
character ‘w’, evaluate the following logical expression:
(i>=6) && (c==’w’)
4. Suppose that i is an integer variable whose value is 7 and f is a floating –point variable whose value is 8.5.
Evaluate the following expression: (i + f) %4
5. What is meant by associativity?
UNIT 5:
1. Consider the following program segment:
x=1;
y=1;
if (n>0)
x=x+1;
y=y-1;
printf(“%d %d”,x,y);
What will be the values of x and y if n assumes a value of (a) 1 and (b) 0.
2. Rewrite the following without using compound relation: if (grade<=59 && grade>=50)
second = second +1;
3. Write a program to check whether an input number is odd or even.
UNIT 7:
1. Write a program for 10 times summation of square of a number.
2. Write a Program that uses loops for array processing.

UNIT 8:
1. Write a C program that sorts a 1D array of integers using the Insertion Sort algorithm.
2. Discuss the memory layout of multi-dimensional arrays in C. 3. How does Bubble Sort differ from
Selection Sort and Insertion Sort

UNIT 9:
1. Define a null-terminated string in C programming and explain its significance.
2. What is the purpose of the null character ('\0') in a null-terminated string?
3. Explain the difference between a null-terminated string and a character array.
4. How is the length of a null-terminated string determined in C?
5. Discuss the importance of null-terminated strings in functions like strlen(), strcpy(), and strcmp().

UNIT 10:
1. Explain the difference between strchr() and strstr() functions in C with respect to string searching.
2. Explain the purpose of the toupper() and tolower() functions in C. Provide an example.
3. Describe the process of modifying a string in C. Provide an example demonstrating a modification
operation.
UNIT 11:
1. What is the purpose of a function prototype?
2. How do you define a function in C?
3. What is the syntax for calling a function in C?
4. Can a function return a value? If so, how?
5. How are parameters passed to a function in C?
6. What is the difference between formal parameters and actual parameters?
UNIT 12:
1. What is the primary characteristic of recursive functions?.
2. When is it appropriate to use inline functions?.
3. Can you name two types of recursion commonly used in programming?
UNIT 13:
1. Discuss how loop operators enable functions to execute a block of code repeatedly and provide examples
demonstrating their practical application..
2. Discuss the concept of functions with arrays in C programming. Explain how functions can accept arrays
as arguments and return arrays as results.
3. Provide examples to illustrate how decision statements can be used to make choices based on different
conditions within functions.
UNIT 14:
1. Implement the insertion sort algorithm in C and explain how it works.
2. Explain the process of sorting an array using the bubble sort algorithm.

You might also like