0% found this document useful (0 votes)
3 views1 page

CSE-105 CT-1 Question

The document outlines an exam for the CSE 105 course at the Military Institute of Science & Technology, focusing on structural programming language concepts. It includes questions on defining computer programming, correcting code snippets, analyzing code outputs, and comparing two code examples. The exam consists of multiple questions with specified marks for each, testing students' understanding of programming syntax and logic.
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)
3 views1 page

CSE-105 CT-1 Question

The document outlines an exam for the CSE 105 course at the Military Institute of Science & Technology, focusing on structural programming language concepts. It includes questions on defining computer programming, correcting code snippets, analyzing code outputs, and comparing two code examples. The exam consists of multiple questions with specified marks for each, testing students' understanding of programming syntax and logic.
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/ 1

Military Institute of Science & Technology (MIST)

Department of Computer Science and Engineering


CT - 1, Course: CSE 105: Structural Programming Language

Time: 35 minutes

No Question Marks

1. Define Computer programming. 2+5=7


(CO-1)
Rewrite the corrected code and Point out fixed errors in the code
snippet below.

1 #include<stdio.h>​
2
3 int main{}
4 {
5 Float f1,f2;
6 print(“Enter two numbers: );
7 scant(“%f%f”, &f1,&f2);
8 float 2sum=f1+f2
9 printf(“The sum is %d”, &2sum);
10 }

2. Analyze the following code and write the output code. 8

1 #include<stdio.h>
2 int main()
3 {
4 int x,y;
5 x=y=2;
6 y+= ++x;
7 x=x << y-- ;
8 y=y<< --y;
9 printf("%d %d", x>>2,y);
10 }

3. Code 1: Code 2:
5
#include<stdio.h> #include<stdio.h>
int main() int main()
{ {
int i=5; int i=5;
while(i>5) { do{
printf(“Happy New Year\n”); printf(“Happy New Year\n”);
i--; i--;
} }
} while(i>5);
}

Analyze the above code snippets. Show and explain the output of both the
codes.

You might also like