CU SEC-A-1 C Programming Language, 2022

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

Open this paper in MathQP

  1. texttt <assert.h> (ii) texttt <stdio.h> (iii) texttt <stdlib.h> (iv) texttt <conio.h>
  2. 15 (ii) 16 (iii) 15.6 (iv) 10
  3. 30 (ii) 31 (iii) Infinite (iv) None of these.
  4. Arrange the operators according to higher to lower order precedence : (I) texttt (II) texttt % (III) texttt >= (IV) texttt ++
  5. Forever (ii) Never (iii) 0 (iv) 1
  6. 6 (ii) 5 (iii) 4 (iv) none of these
  7. 0 (ii) 1 (iii) 5 (iv) Error
  8. 28 (ii) 32 (iii) 35 (iv) 40
  9. Which is the correct way to initialize the array structure?
  10. Network (ii) N (iii) network (iv) garbage value
  11. What is a ‘variable’ in C? Distinguish between local and global variables giving examples.
  12. Write a C-program to find all the roots of a quadratic equation with real coefficients.
  13. Distinguish between the function texttt Call by value with texttt Call by address .
  14. Write a C-program to test a number is prime or not.
  15. Write down the classification of the flow control statement in C language. Explain any one statement with proper example.
  16. Write down a C-program to find the area of a triangle if the triangle is formed by three line segments.
  17. What is the difference between the User-defined and Standard library functions in C? Explain with example.
  18. Write a C-program to evaluate the value of function f(x) for x = 1, 2, dots , 10 using the subprogram, where f(x) is given by f(x) = x 2 + 5, if 0 le x < 5 -2x + tan -1 x, if 5 le x < 10
  19. Write a C-program to find the sum of first n even positive integers to illustrate a function ‘ texttt Call by value '.
  20. Write down the C expressions for the following functions : (I) x y 2 + left (yz z / 10 right ) 5 (II) cot 2 x + |x log 10 x|
  21. Write short notes on : (I) Arithmetic operator (II) Relational operator (III) Logical operator.
  22. What would be printed on the screen if the following program is executed : main() int i, j; for(i=1; i<=5; i++) for (j=1; j<=i; j++) printf(" printf(" n ");
  23. Using a texttt for -loop write a program in C to find first 20 Fibonacci numbers.
  24. Distinguish between higher level language and lower level language. Give examples.
  25. What are the main data types in C? Explain with example.
  26. Write a C-program to find the trace of a square matrix.
  27. Write a brief note on object oriented programming.
  28. Write two differences between a compiler and an assembler.
  29. Write a C-program to find the HCF and LCM of two numbers.
  30. What do you mean by recursion in C-language? Differentiate between recursion and iteration.
  31. Write a C-program to test whether a given year is leap year or not.
  32. Write a C-program to find the hypotenuse of a right angled triangle when other two sides are given.
  33. What is texttt if-else statement? Explain with example.
  34. Write down a C-program to evaluate the multiplication of two square matrices of same order.
  35. Write a C-program to find the sum of array elements by passing to a function.
  36. Write a C-program that use a function to sort an array of integers.
  37. Write the output of the following C-program : #include<stdio.h> main() int a, b, c; a=12; ++a; b=a++; c=++a; printf("a=