You are on page 1of 2

MILITARY INSTITUTE OF SCIENCE AND TECHNOLOGY

Department of Industrial Production & Engineering (BME)


Course Code: CSE281
Course Name: Computer Programming
Class Test-01 Spring 2023

Total Marks: 20 Time:40 mins

1. What is the derived data type? Write down at least 2 examples of derived 3
data types.

2. What is a segmentation fault? 2

3. Write down the 6 stages of a program development life cycle. (only names) 3

4. Write down 3 types of logical operators with examples. 3

5. Write down the differences between low-level and high-level languages. 3

6. Identify what type of expression the following are 1

(i) int shift=10>>2;

(ii)int q=(4>2)?0:1;

7. Write down the output of the following codes where 5


a=5, b=10, and c=2, and a,b, and c are all integers.

(i) double e;
printf(“%lu”,sizeof(e));

(ii) int r=(b*c)%3;


printf(“%d”,r);

(iii) printf(“%d”,a/c);

(iv) int s=(b%c==0)&&(b%a==0);


printf(“%d”,s);

(v) printf(“%d”,--a);

You might also like