Skip to content

Programming and Problem Solving

CSE · Quiz · Fall 26

Paper 2 of 8Section B · Batch 72 · Humaira Afrin Prity (1)Switch

Section B · Batch 72

Paper 2 of 8

This browser can’t show the PDF here

Open it, and your phone’s PDF viewer takes it, or download it.

Read the questions as text

Read off the PDF by AI, so it may have mistakes. The PDF is the original.

Daffodil International University Department of Computer Science and Engineering Class Test - 1 Course: CSE 113 Programming and Problem Solving Course Teachers: Dr. S.R.H. Noori Name: | ID: | Section: | Marks: 15 | Time: 20 min 1. Which one is invalid variable name? (a) name (b) this_is_a_variable_name (c) 1variable (d) sum1 2. if a=5, b=10, c= -3 than what will be the value of this expression: a + (b / (+c)) (a) 1 (b) 7 (c) 10 (d) 0 3. Which one is keyword in C? (a) C (b) printf (c) number (d) if 4. If a and b are integer type variables and a=25, b=2 then what will be the output of a/b (a) 12.0 (b) 12 (c) 12.5 (d) 12.50 5. What is the size of an int data type? a) 4 Bytes b) 8 Bytes c) Depends on the system/compiler d) Cannot be determined 6. Convert the following the statements as a C expression 1. A number is evenly divided by 4 or 400 but not with 100 Answer: 2. A persons height is 5.4 to 6.4 feet but not 6 feet Answer: 7. What will be output of the following program? [Figure: C program code with main function containing int a=5, b=5, c=4; c += a==b; printf("A=%d B=%d C=%d", a, b, c);] 8. What is the output of this program? [Figure: C program code with main function containing int x=4, y=3, z=2; y = ++x + 1; z = 1 - x--; printf("X=%d Y=%d Z=%d", x, y, z);] 9. Write a C program that will calculate the simple interest. The formula to calculate the simple interest is: simple_interest = (p * t * r) / 100 Where p is principal amount, t is time and r is rate of interest. The program will read the values of principal amount, time and interest rate from the user and calculate the simple interest. Answer: