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
- The value of the arithmetic expression texttt 5 * 8 - 7/3 - 11/3/2 (written in C) is
- What is the correct statement for computing 4 5 in C?
- What will be the output of the following program? #include<stdio.h> void main() int k=2023; k=(k++-k++); printf("%d",k);
- How many times will the following while loop execute? int n = 2023; while(n>0) n = n/10;
- Which of the following keyword is used to transfer control from a function back to the calling function?
- C program is converted into machine language with the help of a/an
- What does the statement mean? x -= y + 1
- texttt scanf() is a predefined function in which of the following header files?
- What are the different types of real data type in C?
- The program segment float x = 2.5; printf (" will print
- cot left ( pi + dfrac theta 3 right ) + tan 2 left ( sin -1 theta right )
- x 3x + log 5(|x| + 2023) .
- What are the main data types in C? Give one example of each type.
- Write short notes on Logical operators in C.
- 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.
- What is programming language? Differentiate between Higher Level Language and Lower Level Language.
- texttt do..while loop
- texttt if-else statement
- texttt switch() statement
- function definition.
- 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 .
- 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("
- What is wrong in the following statement? scanf("
- Distinguish between the user-defined function and standard built-in function.
- Write a C program to check whether a number is even or odd.
- Compiling
- Back slash constants
- Logical operators.
- Write a simple code that will check if a number is positive or negative.
- 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
- Write an algorithm to find factorial of a given number. Hence write the corresponding C program.
- Write a C program to display the following output (using nested for loop) : qmarks 5+5 * * * * * * * * * * * * * * *
- Distinguish between RAM and ROM.
- What is local variable and global variable? Explain with suitable example.
- Write an algorithm and draw the flow chart for finding the real roots of ax 2 + bx + c = 0 ( a, b, c are constants).
- texttt scanf("%c", letter);
- texttt letter = getchar();
- 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("
- 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.