CU SEC-A-1 C Programming Language, 2023

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

Open this paper in MathQP

  1. The value of the arithmetic expression texttt 5 * 8 - 7/3 - 11/3/2 (written in C) is
  2. What is the correct statement for computing 4 5 in C?
  3. What will be the output of the following program? #include<stdio.h> void main() int k=2023; k=(k++-k++); printf("%d",k);
  4. How many times will the following while loop execute? int n = 2023; while(n>0) n = n/10;
  5. Which of the following keyword is used to transfer control from a function back to the calling function?
  6. C program is converted into machine language with the help of a/an
  7. What does the statement mean? x -= y + 1
  8. texttt scanf() is a predefined function in which of the following header files?
  9. What are the different types of real data type in C?
  10. The program segment float x = 2.5; printf (" will print
  11. cot left ( pi + dfrac theta 3 right ) + tan 2 left ( sin -1 theta right )
  12. x 3x + log 5(|x| + 2023) .
  13. What are the main data types in C? Give one example of each type.
  14. Write short notes on Logical operators in C.
  15. Write a C-program that reads an integer number and determine whether it is divisible by 7 or not. If not, then find the nearest even integer greater than the integer which is divisible by 7.
  16. What is programming language? Differentiate between Higher Level Language and Lower Level Language.
  17. texttt do..while loop
  18. texttt if-else statement
  19. texttt switch() statement
  20. function definition.
  21. Write a program in C to compute sum of the first n terms of the series : 2 + 2 + 4 + 2 + 2 + 4 + 2 + 2 + cdots .
  22. Find the output of the following program by giving appropriate explanation : qmarks 6+4 #include <stdio.h> void main() int a = 2023, b = 2024; a = a+b; b = a - b; a = a - b; a = a*b; b = a/b; a = a/b; printf("
  23. What is wrong in the following statement? scanf("
  24. Distinguish between the user-defined function and standard built-in function.
  25. Write a C program to check whether a number is even or odd.
  26. Compiling
  27. Back slash constants
  28. Logical operators.
  29. Write a simple code that will check if a number is positive or negative.
  30. What will be the outcome of the following conditional statement if the value of variable texttt s is 10? s>=10 s<25 s!=12
  31. Write an algorithm to find factorial of a given number. Hence write the corresponding C program.
  32. Write a C program to display the following output (using nested for loop) : qmarks 5+5 * * * * * * * * * * * * * * *
  33. Distinguish between RAM and ROM.
  34. What is local variable and global variable? Explain with suitable example.
  35. Write an algorithm and draw the flow chart for finding the real roots of ax 2 + bx + c = 0 ( a, b, c are constants).
  36. texttt scanf("%c", letter);
  37. texttt letter = getchar();
  38. What is the output of the following C-code? #include <stdio.h> int main() int c = 1; int s = 0; while ((c>0) (c<60)) s = s+c; c++; printf("
  39. Write a C-program which reads two integers values m and n . If m is less than n , display their product. If n is less than m , display their difference. If both are equal, display their sum.