Pps CT 1 Set 1
Pps CT 1 Set 1
CYCLE TEST – I
Academic Year: 2022-2023 (ODD Semester)
void main()
float a=654.1239;
printf("%0.3f",a);
A. Compiler error
B. 654.123900
C. 654.123
D. 654.124
Answer: D
5 1 2 1 1 2.5.2
The Operator '&' is used as
A. Logical AND
B. Bitwise AND
C. Logical OR
D. Bitwise OR
Answer: B
6 1 2 1 1 1.6.1
Find the output of the following code snippet.
A.10
B.11
C. Compile time error
D.0
Answer: C
7. 1 2 1 1 1.61
Find the value of x in this C code
A. 3.75
B. Depends on compiler
C. 24
D. 3
Answer: C
8. Find the output of the following code snippet 1 2 1 1 2.5.2
int a=10;
printf("%x ",a);
printf("%d",a<<2);
A. 10 40
B. a 40
C. 10 46
D. a 46
Answer: B
9. Identify the correct order of evaluation for the 1 2 1 1 2.5.2
expression D = 50 + 12 * 4 / 32 % 4 - 10
a. * / % + - =
b. = * / % + -
c. / * % - + =
d. % / - + =*
Answer. A
10. 1 2 1 1 1.61
Find the output of the following code
#include<stdio.h>
int main ()
{
static int i=5;
if (--i)
{
printf("%d ",i);
main();
}
return (0);
}
A. 54321
B. 0000
C. 4321
D. 00000
Answer. C
#include<stdio.h>
int main()
float l,b,h,s,v;
scanf("%f",&l);
scanf("%f",&b);
scanf("%f",&h);
s=2*(l*b+b*h+b*h);
v=l*b*h;
printf("\n The surface area of cuboid is '%f'",s);
return 0;
Part C (1 * 5 = 5 Marks)
#include <stdio.h>
int main ()
scanf("%f", &celsius);
return 0;
}
(OR)
17 Draw flowchart to compute the salary of an employee in 1 2 3 5 2.6.3
a company and write an algorithm for generating the pay
slip of an employee working in XYZ Company. Input for
the process will be the basic pay for the employee.
Gross salary is calculated as Basic Pay + HRA + DA.
HRA is fixed as 30% of basic pay and DA as 80% of
basic pay. Calculate the gross salary
Algorithm 1mark
Flow chart 1mark
Program 3 Marks