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
- texttt else (ii) texttt name (iii) texttt age (iv) texttt cha r .
- 20,000 (ii) texttt 2.0E+2.2 (iii) 20000 (iv) texttt 2.0E4
- Which one of the following operators is used for decision making in C?
- Point out the error, if any, in the texttt for loop given below : : int k=4; for (;;) printf (" break; :
- C programs are converted into machine language with help of
- 10 (ii) 11 (iii) 8 (iv) none of these.
- 3 (ii) 3.333333 (iii) 10/3 (iv) no output will be shown.
- texttt stdlib.h (ii) texttt time.h (iii) texttt string.h (iv) texttt mathematics.h
- 1, 1 (ii) 2, 1 (iii) 1, 2 (iv) 2, 2
- 0 (ii) 2022 (iii) 1 (iv) -1
- Explain the need for the following statements : texttt #include<stdio.h> texttt #include<math.h>
- What is the difference between ‘ texttt a ' and “ texttt a ” in C?
- What is the difference between ‘ texttt = ' and ‘ texttt == ' in C language?
- Write a C program to find the area of a circle whose circumference is given.
- Explain nested texttt if-else with suitable example. What is the difference between nested texttt if-else and texttt switch case ?
- 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
- 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 .
- 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=
- State the general form of texttt switch and texttt break statements. Explain it with suitable example.
- For x = 19 , y = 5 , z = 18 , evaluate the following expression : texttt x < y x > z > (y + 5 > z - 2)
- 2022 x 2022 + log 10 ( sinh x + 2022) + e cos x + 1
- dfrac 1 sin x + sec x + tan -1 (x 3 + 1)
- texttt math.h (ii) texttt stdio.h (iii) texttt time.h
- 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) ............ ............
- 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.
- Write a C programe to find the smallest element in a given list of n numbers.
- Compiler
- Interpreter.
- What is two dimensional array? Give an example.
- Using array statement, write a C-program to arrange a set of real numbers in ascending order.
- Can a function have more than one texttt return statement? Explain with suitable examples.
- Using function, write a C program to find the sum of the following series. 5! + 6! + 7! + 8!
- Distinguish between actual and formal arguments with suitable example.
- What is recursion in C? Explain with suitable example.
- Write a short note on Scope Rules of Variables in C.