CU SEC-1 C Programming Language, 2024
University of Calcutta question paper, B.Sc. Honours Semester I, 2024. C Programming Language. Typed in LaTeX, searchable, with a printable PDF.
Open this paper in MathQP
- Write the output of the following C program : #include<stdio.h> main() int x = 7, y = 3, z; z = x printf("z =
- What will be the output of the following C program? Give reasons in support of your answer. #include<stdio.h> main() int n = 2025; printf("Result=
- What will be the output of the following C program? Give reasons in support of your answer. #include<stdio.h> main() int m, n=6, p=6; m=n==p; printf("
- Write the following expression in C : tan left (1 + sqrt x right ) + 3 cos x 3 + log 10 left |1 + sec 3 x right |
- Explain the use of texttt if-else statement in C with the help of an example.
- Compare and contrast RAM and ROM.
- State the conditions that a variable name in C must satisfy.
- What are the main data types in C? Write short note on any one of them.
- Write a program in C to find the sum of odd numbers between 0 and 100 .
- What is a loop in C? Explain its necessity with the help of an example.
- Write a program in C to sort 25 real numbers in ascending order.
- Describe the use of logical operators in C.
- Write a program to check whether a given number is divisible by both 3 and 5 .
- Compare between texttt for and texttt while loops.
- Develop a C program to compute the product of two matrices of order 2 times 2 .
- Find the errors in the following C program : #include<stdio.h> int main() int i; for (i = 0, i != 4; i++) print(" return 0,
- Write a program in C to read three numbers x, y, z and rotate their values, such that x has the value of y , y has the value of z and z has the value of x .
- Write the different relational operators used in C language.
- Write a C program to find the variance of a given set of numbers.
- Explain the differences between “break” and “continue” statements in C. Write a program to illustrate the use of both.
- Write a C program to find the approximate value of pi .
- Write a program in C that reads a positive integer, and checks whether it is an Armstrong number or not.
- Write a program in C that reads 20 names and sorts them in alphabetical order.
- Write a C program to evaluate f(x) for x = 0, 2, dots , 10 using a function sub-program, where f(x) = x 2 + 2 sin x, x < 2 2, x = 2 x 3 + e x, x > 2
- Write a program in C to compute the sum 1 - dfrac 2 2! + dfrac 3 3! - dfrac 4 4! + dfrac 5 5! - cdots - dfrac 50 50! .
- Write a program in C that reads a positive integer and prepares its multiplication table.