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

  1. Which of the following is not a valid C variable name?
  2. Which of the following translates high-level languages into machine code?
  3. In C, a variable cannot contain
  4. Which of the following is not an arithmetic operation?
  5. Convert dfrac x 4 + sqrt x 2 into C statement.
  6. Maximum number of elements in an array declaration texttt int x[5][10] is
  7. 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;
  8. If texttt int a = 5 , then find the value of texttt q = (++a*(a++ + 3)) :
  9. What does this statement mean? texttt x -= y + 1
  10. The correct way to declare a two-dimensional array in C is
  11. What is Hardware and Software? Give at least two examples of each.
  12. Distinguish between RAM and ROM.
  13. State the conditions that a variable name in C must satisfy.
  14. What is the difference among the data types texttt float , texttt long float and texttt double .
  15. What is meant by an operator in C? Explain the functions of logical AND and logical OR operators.
  16. Write a program that converts the temperature values in Centigrade into Fahrenheit.
  17. What is the difference between local and global variables?
  18. 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 =
  19. State the differences between texttt if-else and texttt switch case . Give example.
  20. Write the importance of texttt break and texttt continue keywords.
  21. Write a program to check that given number is divisible by 11 or not.
  22. Write a short note on two-dimensional array. Give an example.
  23. Using array, write a C program to sort a given set of numbers in descending order.
  24. What is texttt do-while statement? Explain with example.
  25. Write the following expression in C : 25 x 25 + sec x + log e(1 + cot x)
  26. 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) ....; ....; ....;
  27. 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
  28. What do you mean by one-dimensional array? Give an example.
  29. Write a function to evaluate factorial of n using a loop in C.
  30. What is the objective of the texttt main() function in C? What is the purpose of texttt printf() and texttt scanf() in C program?
  31. Write three benefits of using function. Can a function have more than one return statement? Explain with examples.
  32. 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 .
  33. Write an algorithm and draw the flow chart for finding the real roots of ax 2 + bx + c = 0 .
  34. Write a C program to reverse a given number.
  35. Write a C program to find the volume of a sphere of radius a .
  36. Write a C program to evaluate the following polynomial for a given value of x and n 1 + x + x 2 + ldots + x n.
  37. What is the difference between function and recursive function in C language with example?
  38. Write a C program to find the hypotenuse of a right-angled triangle when other two sides are given.