0% found this document useful (0 votes)
42 views3 pages

Programming For Problem Solving

T

Uploaded by

nikunjagarwal117
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views3 pages

Programming For Problem Solving

T

Uploaded by

nikunjagarwal117
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

GARGI MEMORIAL INSTITUTE OF TECHNOLOGY

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


CONTINUOUS ASSESSMENT, EVEN SEMESTER, 2024
COURSE NAME: PROGRAMMING FOR PROBLEM SOLVING

COURSE CODE: ESCS201; YEAR: FIRST YEAR CSE; SEMESTER: 2ND

FULL MARKS: 25; TIME: 60 MINS

GROUP – A: MCQ TYPE QUESTION (ANSWER ALL THE QUESTIONS) [5 x 1= 05 Marks]


1. Choose the correct alternatives:
i)What is the size of an int data type?
a) 4 Bytes c) Depends on the system/compiler
b) 8 Bytes d) Cannot be determined
ii) What will be the output of the C program?
#include<stdio.h>
int main()
{ for(;;)
{ printf("%d ", 10); }
return 0;
}
a). Compilation error c). Program never ends
b). 10 d). None of the above

iii) What will be the output of the C program?


#include<stdio.h>
int main()
{ int i;
for(i = 0;i<=3;i++);
printf("%d", i);
return 0;
}
A. Compilation error C. 4
B. 1 2 3 D. 0 1 2 3

iv) What should be the output?


#include <stdio.h>
void main()
{ int a = 10/3;
printf("%d",a);
}

a) 3.33 c) 3
b) 3.0 d) 0
v) What is right way to initialize array?
a) int num[6] = { 2, 4, 12, 5, 45, 5 }; c) int n{6} = { 2, 4, 12 };
b) int n{} = { 2, 4, 12, 5, 45, 5 }; d) int n(6) = { 2, 4, 12, 5, 45, 5 };
GROUP – B: SHORT ANSWER QUESTIONS (ANSWER ALL THE QUESTIONS) [5 x 2= 10 Marks]

2. Draw a flow chat to add two numbers entered by the user

3. What will be the output of the following C code?


#include <stdio.h>
int main()
{ int x = 1, y = 0, z = 3;
x > y ? printf("%d", z) : return z;
}

4. How conditional operator can be used to Check Whether a Number is Even or Odd?

5. How can you apply the relational operator to find the largest between two integer numbers?

6. Why switch case is better than if-else ladder logic?

GROUP – C: LONG ANSWER QUESTIONS (ANSWER ALL THE QUESTIONS) [2 x 5 = 10 Marks]

7. Write a C Program to Swap two input integer Numbers without a Using Temporary Variable.

8. Write a C Program to Print Floyd's Triangle.


1
23
456
7 8 9 10

.
QUESTIONS MAPPING WITH CO AND ITS TAXONOMY LEVEL:

RELEVANT BLOOM’S
QUESTION MARKS
GROUP TAXONOMY
COURSE
NO. ALLOTTED
OUTCOME (CO) LEVEL

i BT-L1 1
CO1

ii BT-L4 1
CO3

iii CO3 BT-L4 1


GROUP - A

iv CO1 BT-L4 1

v CO3 BT-L2 1

2 CO1 BT-L2 2

3 CO2 BT-L4 2

4 CO2 BT-L2 2
GROUP - B

5 CO3 BT-L2 2

6 CO3 BT-L2 2

7 CO2 BT-L4 5

GROUP - C
8 CO3 BT-L5 5

● CO : COURSE OUTCOME
● BT-L : BLOOM’S TAXONOMY LEVEL (1- Remembering, 2- Understanding, 3 – Applying, 4
– Analyzing, 5 – Evaluating, 6 - Creating)

You might also like