CU SEC-A-1 C Programming Language, 2025
University of Calcutta question paper, B.Sc. Honours Semester III, 2025. C Programming Language. Typed in LaTeX, searchable, with a printable PDF.
Open this paper in MathQP
- Which of the following is not a valid C variable name?
- Which of the following translates high-level languages into machine code?
- In C, a variable cannot contain
- Which of the following is not an arithmetic operation?
- Convert dfrac x 4 + sqrt x 2 into C statement.
- Maximum number of elements in an array declaration texttt int x[5][10] is
- How many times the while loop in the following C code will get executed? #include <stdio.h> int main() int j=1; while (j <= 255) printf (" j++ return 0;
- If texttt int a = 5 , then find the value of texttt q = (++a*(a++ + 3)) :
- What does this statement mean? texttt x -= y + 1
- The correct way to declare a two-dimensional array in C is
- What is Hardware and Software? Give at least two examples of each.
- Distinguish between RAM and ROM.
- State the conditions that a variable name in C must satisfy.
- What is the difference among the data types texttt float , texttt long float and texttt double .
- What is meant by an operator in C? Explain the functions of logical AND and logical OR operators.
- Write a program that converts the temperature values in Centigrade into Fahrenheit.
- What is the difference between local and global variables?
- What is the output of the following code? #include <stdio.h> main() int x = 3, y = 5, z = 10, p = 8, A, B, C, D; A = ++x * ++y; B = y– * y–; C = ++z * –z; D = p– * –p; printf("A =
- State the differences between texttt if-else and texttt switch case . Give example.
- Write the importance of texttt break and texttt continue keywords.
- Write a program to check that given number is divisible by 11 or not.
- Write a short note on two-dimensional array. Give an example.
- Using array, write a C program to sort a given set of numbers in descending order.
- What is texttt do-while statement? Explain with example.
- Write the following expression in C : 25 x 25 + sec x + log e(1 + cot x)
- Write down the texttt while and texttt do-while statement which are equivalent to the following texttt for statement : for (n = 1; n <= 10; ++n) ....; ....; ....;
- Write a C program to evaluate the sum of the series : 1 + frac 1 2 2 + frac 1 3 2 + ldots + frac 1 n 2
- What do you mean by one-dimensional array? Give an example.
- Write a function to evaluate factorial of n using a loop in C.
- What is the objective of the texttt main() function in C? What is the purpose of texttt printf() and texttt scanf() in C program?
- Write three benefits of using function. Can a function have more than one return statement? Explain with examples.
- Using function, write a C program to find the functional values for five given value of x , where f(x) = x + sin x - e -x and input values of x are 0.2, 0.5, 0.7, 0.9, 1 .
- Write an algorithm and draw the flow chart for finding the real roots of ax 2 + bx + c = 0 .
- Write a C program to reverse a given number.
- Write a C program to find the volume of a sphere of radius a .
- Write a C program to evaluate the following polynomial for a given value of x and n 1 + x + x 2 + ldots + x n.
- What is the difference between function and recursive function in C language with example?
- Write a C program to find the hypotenuse of a right-angled triangle when other two sides are given.