Sebo
Sebo
SENDUPS EXAMS’2023
COMPUTER SCIENCE SSC–II
SUBJECTIVE PAPER
Total Marks: 42 Time allowed: 2.45 hours
Note: Answer all parts from Section ‘B’ each question carry equal marks. Write your answers
neatly and legibly.
int main()
{
int day = 5;
switch (day)
{
case 1:
printf("Monday");
break;
case 2:
printf("Tuesday");
break;
case 3:
printf("Wednesday");
break;
case 4:
printf("Thursday");
break;
case 5:
printf("Friday");
break;
case 6:
printf("Saturday");
break;
case 7:
printf("Sunday");
break;
}
return 0;
}
x. Construct Truth Table for the following Boolean Expression:
F= x y z + x y z + x y + x y z
#include<stdio.h>
void main( )
for (i = 0; i <= 10; i = i + 2)
{
printf("%d\n", i);
}
OR
xii. Write a program that read a number and print its table using for loop.
_______________________________________________________________________________________________
SECTION – C (Marks20)
____________________________________________________________________________
Note: Attempt all questions. Marks of each question are given within brackets. (4 5 = 20)
____________________________________________________________________________
Q.3 Draw a flowchart to input numbers from the user and check whether it is even or (5)
Odd?
OR
Explain types of relational operators with examples.
Q.4 Explain else if conditional control structure: with syntax and programming (5)
example.
OR
Write a program print vowel letters ( a e i o u ) using switch statement:
Q.5 Simplify the Boolean Function F, using Karnaugh Mapping (K-map) (5)
Also construct logic circuit for the simplified expression.
Q.6 What is meant by type casting? Differentiate between implicit type casting and explicit type casting
OR (5)
Differentiate between while and do while loop with syntax, purpose and programming example.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
BAHRIA COLLEGE ZAFAR CAMPUS E-8 ISLAMABAD
SENDUPS EXAMS’2023
COMPUTER SCIENCE SSC–II
OBJECTIVE PAPER
SECTION – A (Marks 12)
Time allowed: 15 mints
NOTE: Section – A is compulsory. All parts of this section are to be answered on this page and handed
over to the Centre Superintendent. Deleting/overwriting is not allowed. Do not use lead pencil
Q1: Fill the relevant bubble in each part. Each part carry one mark.
1. What will be the output of the following code .
#include <stdio.h>
int main()
{
char ch;
for(ch = 'a'; ch <= 'z'; ch++)
{
printf(" %c\t", ch);
}
return 0;
}
A. a to z all characters B. z , a
C. a , z D. z till a all characters
2. Which symbol of the flowchart connect one part of the flow chart to the other on the next page.
A. on page symbol B. Flow lines
C. process symbol D. off page symbol
3. Which structure of c language refers to the execution of operations in the order in which they
appear.
A. repetition B. sequential
C. selection D. algorithms
A. k+=a B. k=+a
C. k++a D. k= a++
5. Which escape sequence is used to move the cursor to the next horizontal tabular position.
A.\t B. \n
C. \r D. \b
6. How many time “I love Pakistan” will be displayed by the following code.
int a;
for( a=1; a<5 ; a+2)
printf( “I love Pakistan”);
A. 3 B. 5
C. infinite D. it will not run
8. Choose the following loop structure to print the values for the fixed number of time
A. do-while B. while
C. for D. switch
9. If A=1 and B=0 then what will be the value of function Q .
A. 1 B. 0
C. 10 D. 11
10. Which of the following operators are not allowed in the expression of Switch statement?
A. logical B. assignment
C. arithematic D. relational
11. How many AND gates are required to create the logic circuit of the following Boolean function?
F= xz + yz +xyz
A. 4 B. 2
C. 3 D. 1
A. execution B. iteration
C. enumeration D. reverse
A. ++ B. +
C. ! D. _
-------------------------------------------------------------------------------------------------------------------