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
- texttt <assert.h> (ii) texttt <stdio.h> (iii) texttt <stdlib.h> (iv) texttt <conio.h>
- 15 (ii) 16 (iii) 15.6 (iv) 10
- 30 (ii) 31 (iii) Infinite (iv) None of these.
- Arrange the operators according to higher to lower order precedence : (I) texttt (II) texttt % (III) texttt >= (IV) texttt ++
- Forever (ii) Never (iii) 0 (iv) 1
- 6 (ii) 5 (iii) 4 (iv) none of these
- 0 (ii) 1 (iii) 5 (iv) Error
- 28 (ii) 32 (iii) 35 (iv) 40
- Which is the correct way to initialize the array structure?
- Network (ii) N (iii) network (iv) garbage value
- What is a ‘variable’ in C? Distinguish between local and global variables giving examples.
- Write a C-program to find all the roots of a quadratic equation with real coefficients.
- Distinguish between the function texttt Call by value with texttt Call by address .
- Write a C-program to test a number is prime or not.
- Write down the classification of the flow control statement in C language. Explain any one statement with proper example.
- Write down a C-program to find the area of a triangle if the triangle is formed by three line segments.
- What is the difference between the User-defined and Standard library functions in C? Explain with example.
- 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
- Write a C-program to find the sum of first n even positive integers to illustrate a function ‘ texttt Call by value '.
- 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|
- Write short notes on : (I) Arithmetic operator (II) Relational operator (III) Logical operator.
- 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 ");
- Using a texttt for -loop write a program in C to find first 20 Fibonacci numbers.
- Distinguish between higher level language and lower level language. Give examples.
- What are the main data types in C? Explain with example.
- Write a C-program to find the trace of a square matrix.
- Write a brief note on object oriented programming.
- Write two differences between a compiler and an assembler.
- Write a C-program to find the HCF and LCM of two numbers.
- What do you mean by recursion in C-language? Differentiate between recursion and iteration.
- Write a C-program to test whether a given year is leap year or not.
- Write a C-program to find the hypotenuse of a right angled triangle when other two sides are given.
- What is texttt if-else statement? Explain with example.
- Write down a C-program to evaluate the multiplication of two square matrices of same order.
- Write a C-program to find the sum of array elements by passing to a function.
- Write a C-program that use a function to sort an array of integers.
- 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=