[go: up one dir, main page]

0% found this document useful (0 votes)
20 views5 pages

Sebo

The document outlines the subjective and objective papers for the Computer Science SSC-II Sendups Exams 2023 at Bahria College Zafar Campus, Islamabad. It includes various questions related to algorithms, programming concepts, flowcharts, and Boolean functions, with specific sections for answering. The objective section consists of multiple-choice questions covering programming fundamentals and C language structures.
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)
20 views5 pages

Sebo

The document outlines the subjective and objective papers for the Computer Science SSC-II Sendups Exams 2023 at Bahria College Zafar Campus, Islamabad. It includes various questions related to algorithms, programming concepts, flowcharts, and Boolean functions, with specific sections for answering. The objective section consists of multiple-choice questions covering programming fundamentals and C language structures.
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/ 5

BAHRIA COLLEGE ZAFAR CAMPUS E-8 ISLAMABAD

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.

SECTION – B (Marks 22)


Q.1 Attempt any NINE parts from the following. All parts carry equal marks. (11  2 = 22)
i. How can we measure the efficiency of a good algorithm?
ii. What are the rules for specifying variables name. Only 2 rules are required.
iii. Write an algorithm that input marks and print the message “PASS” or “FAIL”. Passing marks
criteria is 40.
iv. Evaluate each of the following expression assuming,
a = 5, z = 1.5, c = 2 and d = 3.3
a. b = a % z % d;
b. x = (a + c)/(z + 0.3);
c. y = c / d * a;
v. Why format specifier is used. Write their use with scanf( ) and printf( ) function/
OR
What is the purpose of escape sequence in c programming? Name few with their purpose
vi. Why the preprocessor directives are used? Name the commonly used
preprocessor directives.
OR
What is the difference between # define and # include?
vii. Compare an assignment operator (=) and an equal to (= =) operator by giving an
example.
viii. Write a program to print odd numbers in reverse order from 1 to 100.
OR
Why conditional ternary operator is used .give one example.

ix. What will be the output of the following code?


#include <stdio.h>

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

xi. Convert the following code into while loop.

#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.

xyz + xyz + xyz + xyz

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

4. Which statement is equivalent to “k=k + a”.

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

7. Following is the pre- tested loop.


A. while B. for
C. do- while D. switch

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

12. What is the pass through the loop is called.

A. execution B. iteration
C. enumeration D. reverse

13. Which of the following is not a unary operator?

A. ++ B. +
C. ! D. _

-------------------------------------------------------------------------------------------------------------------

You might also like