0% found this document useful (0 votes)
78 views2 pages

CH 11-Computer-Science-12-PSA

The document consists of a series of questions related to programming concepts, specifically focusing on control structures, syntax, and basic programming tasks in C language. It includes multiple-choice questions and short answer prompts, covering topics such as if-else statements, switch-case syntax, and loops. Additionally, it contains practical programming exercises for identifying vowels and finding the largest number among three inputs.

Uploaded by

iqbalaabi01
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)
78 views2 pages

CH 11-Computer-Science-12-PSA

The document consists of a series of questions related to programming concepts, specifically focusing on control structures, syntax, and basic programming tasks in C language. It includes multiple-choice questions and short answer prompts, covering topics such as if-else statements, switch-case syntax, and loops. Additionally, it contains practical programming exercises for identifying vowels and finding the largest number among three inputs.

Uploaded by

iqbalaabi01
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

Professors’ Science Academy

Q3. Write Short Answers .

1- List any four types of control structure.

2- Find output of following code.


Int a=1, b=6;
if(a+b == 7)
printf(“%d”, b);
3- Trace errors from below code

if(7 =! 10

printf(“hello)

4- What is the use of if-else?

5- shortly describe the simple if.

6- write down the output of code.

if(0)

printf(“Fine”);

else

{printf (“Not fine”);}

7- write general syntax of switch-case?

8- What happens when we do not put a break in any case of switch?

9- describe nested if-else.

Q- Write a program using a switch-case that inputs a character and Check whether it is a vowel or consonant. Print "Vowel" or
"Consonant" on screen accordingly.

Q. Write a program that takes input Three numbers from the user and then print the largest number on screen?​

​ ​ ​

​ ​ ​
Computer Science (Objective) Inter Part-II Time Allowed: 20 mins

●​ Name: Roll No: Max Marks : 15

Note: Four Possible Answers A,B,C & D are given. Encircle The Correct Option. Cutting OR Encircling
more than one option will result in ZERO marks in that Question.

MS-ACCESS AND C-LANGUAGE

1- The entry point of program execution is


(A) start of file ​ (B) any function​ (C) main function​ ​ ​ (D) all
2- printf() defined in
(A) math.h​ ​ (B) conio.h​ ​ ​ (C) stdio.h​ ​ ​ (D) none
3- Which one is post increment operator usage
(A) ++a​ ​ (B) --a​​ ​ (C) a++​ ​ (D) a--
4- which one is unary operator
(A) AND ​ ​ (B) OR ​ ​ ​ (C) NOT​ ​ ​ (D) .All
5- A loop within another loop is called
(A) nested loop​ (B) For loop ​ ​ (C) While loop ​ ​ (D) Do while loop
6- Semicolon at the end of each statement is called
(A) Statement terminator​ ​ (B) Delimiter ​​ (C) pre-processor​ (D) none
7- Variables are created in
(A) RAM​ ​ (B) ROM ​ ​ ​ (C) hard disk ​ ​ ​ (D) USB
8- a + = b is equivalent to
(A) b + =a​ ​ (B)a=+b​ ​ ​ (C) a = a + b ​ ​ ​ (D)b=b+a
9- Which of the following is not valid escape code?
(A) \t ​ ​ ​ (B) \v ​ ​ ​ ​ (C) \y ​​ ​ ​ (D) \f
10- Another term for a conditional operator is
(A) ternary ​ ​ (B) binary ​ ​ ​ (C) byte ​ ​ ​ (D) iteration
11- Conditional operator takes
(A) one operand ​ (B) two operand ​ (C) three operand​ ​ (D) four operand
12- The ---------- Loop must execute the statements at-least once.
(A)Nested​ ​ B) for​ ​ ​ ​ C) do-while​ ​ ​ D) while
13- Which of the following is called Counter Loop?
(A) do-while​ ​ (B) for​​ ​ ​ (C) while ​ ​ ​ (D)all loop
14- Which statement is used by function to return a value?
(A) give ​ ​ (B) send ​ ​ ​ (C) return ​ ​ ​ (D) call
15- A --------------can store text only.
(A) binary file ​ (B) text file ​ ​ ​ (C) exe file ​ ​ ​ (D) object file

You might also like