CU SEC-A-1 C Programming Language, 2022

University of Calcutta question paper, B.Sc. General Semester III, 2022. C Programming Language. Typed in LaTeX, searchable, with a printable PDF.

Open this paper in MathQP

  1. texttt else (ii) texttt name (iii) texttt age (iv) texttt cha r .
  2. 20,000 (ii) texttt 2.0E+2.2 (iii) 20000 (iv) texttt 2.0E4
  3. Which one of the following operators is used for decision making in C?
  4. Point out the error, if any, in the texttt for loop given below : : int k=4; for (;;) printf (" break; :
  5. C programs are converted into machine language with help of
  6. 10 (ii) 11 (iii) 8 (iv) none of these.
  7. 3 (ii) 3.333333 (iii) 10/3 (iv) no output will be shown.
  8. texttt stdlib.h (ii) texttt time.h (iii) texttt string.h (iv) texttt mathematics.h
  9. 1, 1 (ii) 2, 1 (iii) 1, 2 (iv) 2, 2
  10. 0 (ii) 2022 (iii) 1 (iv) -1
  11. Explain the need for the following statements : texttt #include<stdio.h> texttt #include<math.h>
  12. What is the difference between ‘ texttt a ' and “ texttt a ” in C?
  13. What is the difference between ‘ texttt = ' and ‘ texttt == ' in C language?
  14. Write a C program to find the area of a circle whose circumference is given.
  15. Explain nested texttt if-else with suitable example. What is the difference between nested texttt if-else and texttt switch case ?
  16. Write a C program to evaluate the following function : f(x) = x e x, x < 0 2, x = 0 sin x + log 10 (x+1), x > 0
  17. Write a program in C to compute sum of the first 10 terms of the series correct to 4 decimal places : 1 + dfrac 1 2 + 3 + dfrac 1 3 + 5 + dfrac 1 4 + dots .
  18. Find the output of the following program by giving appropriate explanation : #include<stdio.h> int main() int n=0, m; printf("m="); for (m=1, n++; m<=n+3; m++) Printf(" printf("m=
  19. State the general form of texttt switch and texttt break statements. Explain it with suitable example.
  20. For x = 19 , y = 5 , z = 18 , evaluate the following expression : texttt x < y x > z > (y + 5 > z - 2)
  21. 2022 x 2022 + log 10 ( sinh x + 2022) + e cos x + 1
  22. dfrac 1 sin x + sec x + tan -1 (x 3 + 1)
  23. texttt math.h (ii) texttt stdio.h (iii) texttt time.h
  24. Write down the texttt while and texttt do-while statement which are equivalent to the following texttt for statement : for(i=0; i<=2022; ++i) ............ ............
  25. Write a program that reads two integer values in the main function and computes their greatest common divisor in a subfunction called texttt gcd() . Print out the greatest common divisor in the main function.
  26. Write a C programe to find the smallest element in a given list of n numbers.
  27. Compiler
  28. Interpreter.
  29. What is two dimensional array? Give an example.
  30. Using array statement, write a C-program to arrange a set of real numbers in ascending order.
  31. Can a function have more than one texttt return statement? Explain with suitable examples.
  32. Using function, write a C program to find the sum of the following series. 5! + 6! + 7! + 8!
  33. Distinguish between actual and formal arguments with suitable example.
  34. What is recursion in C? Explain with suitable example.
  35. Write a short note on Scope Rules of Variables in C.