Professional Documents
Culture Documents
X Computer Science-2
X Computer Science-2
SECTION-B (Marks-22)
Attempt all parts from this section. All questions carry Equal marks (11 x 2=22)
1. What are three advantages of using flowchart?
2. Differentiate between Printf() and Scanf() Function? OR
Write output of following code
Void main()
{
Int a=5, b=3;
If((a==5) ||(b==7))
printf(“Computer”);
else
printf(“OK”);
}
3. Differentiate between syntax and semantics? Give example of each
4. What is the purpose of gets() function. Give example as well. OR
Identify mistakes in following code
void main(void
{ int a,b;
print(“Hello World\n”)
scanf(“%d,%d”,&a,b);
getch();
}
5. Draw logic circuit of Boolean function
6. Write difference between assembly language and high level language?
7. Why Comments are used in programs?
8. Flowchart to print odd numbers from 1 to 100
9. Why escape sequence is used. Give example as well? OR What is the difference between =
and ==?
10. Write following statement using conditional operator
If(marks>32)
Printf(“Congratulation”);
Else
Printf(“Fail”);
FG Fazaia Public Higher Secondary School (2nd Shift) Nur Khan Base Chaklala Rawalpindi
Sendup Examination 2023- COMPUTER SCIENCE (10A/B)
Name ------------------- Date --------------------------- Group------------------------ T.M (55)
11. What are reserved words? Why they should not be used as variable name? OR
Write about logical and relational operators?
SECTION-C (Marks-20)
Attempt all parts from this section. All questions carry equal marks (4 x 5=20)
Q3. a. What is switch () statement? Explain. Also give 1 example OR
b. Write a program that reads length of cube and prints its volume?
Q4. a. Draw logic circuit diagram and truth table of NOR and NAND gate OR
b. reduce following Boolean function using K-Map