Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

SERSHAH ENGINEERING, SASARAM 2. (A). Discuss arithmetic operators in C programming.

[2]
Mid Semester Test
(B). Draw a flowchart to find the smallest number among 3
B. Tech (CE/ME) Semester – II numbers. [2]
Session 2021-22
3. (A). Write the output of following statement: [1]
Subject: Programming for Problem Solving Time: 2 Hrs
Course Code: 100204 Full Marks: 20 int main( )
___________________________________________________
{
Note: Each question carries equal marks.
int a=50;
1. Choose the correct answer in MCQ and fill in the blank with
appropriate words. [8 x 0.5 = 4] printf(“%c”,a);
A. The result of bitwise operation 40 | 25 will be:-
i. 25 ii. 40 iii. 57 iv. 65 return 0;

B. The VALID syntax to declare a variable is }


i. int a-1; ii. int A(1); iii. int 1a; iv. int _1;
(B). WAP in C to take input two matrix along with its dimension
and find its multiplication. [3]
C. Choose the VALID relational operator in C:-
i. << ii. != iii. >> iv. & 4. (A). Write the output of following statement: [1]

D. gets() function has been defined in the header file


i. conio.h ii. stdio.h iii. string.h iv. math.h printf(“%d”,3<<10);

E. Inside the parentheses of the for(initial value; (B). WAP in C to take input JEE score of N students and find the
condition; incrementation/decrementation) JEE score of Rank1 and Rank2. [3]
loop the number of mandatory statements among the
above 3 is …………………. 5. (A). WAP in C to print following histogram. [2]

F. do while loop is the example of ………… controlled loop. 1


G. void fun(int x) is of take …………… and return 2 3
…….…… nature. 4 5 6
H. Variable(s) inside the parentheses of any function is(are) 7 8 9 10
called ……………………

(B). WAP in C to swap value of two variables using a function. [2]


2. (A). Discuss arithmetic operators in C programming. [2] SERSHAH ENGINEERING, SASARAM
Mid Semester Test
(B). Draw a flowchart to find the smallest number among 3
numbers. [2] B. Tech (CE/ME) Semester – II
Session 2021-22
3. (A). Write the output of following statement: [1]
Subject: Programming for Problem Solving Time: 2 Hrs
int main( ) Course Code: 100204 Full Marks: 20
___________________________________________________
{
Note: Each question carries equal marks.
int a=50;
1. Choose the correct answer in MCQ and fill in the blank with
printf(“%c”,a); appropriate words. [8 x 0.5 = 4]
A. The result of bitwise operation 40 | 25 will be:-
return 0; i. 25 ii. 40 iii. 57 iv. 65

} B. The VALID syntax to declare a variable is


i. int a-1; ii. int A(1); iii. int 1a; iv. int _1;
(B). WAP in C to take input two matrix along with its dimension
and find its multiplication. [3]
C. Choose the VALID relational operator in C:-
4. (A). Write the output of following statement: [1] i. << ii. != iii. >> iv. &

D. gets() function has been defined in the header file


printf(“%d”,3<<10); i. conio.h ii. stdio.h iii. string.h iv. math.h

(B). WAP in C to take input JEE score of N students and find the E. Inside the parentheses of the for(initial value;
JEE score of Rank1 and Rank2. [3] condition; incrementation/decrementation)
loop, the number of mandatory statements among the
5. (A). WAP in C to print following histogram. [2] above 3 is ………………….

1 F. do while loop is the example of ………… controlled loop.


2 3 G. void fun(int x) is of take …………… and return
4 5 6 …….…… nature.
7 8 9 10 H. Variable(s) inside the parentheses of any function is(are)
called ……………………

(B). WAP in C to swap value of two variables using a function. [2]

You might also like