Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

SCHOLAR ACADMEY

COMPUTER SCIENCE HALF BOOK (SSC-2)

Section -B
Question 01:
What is difference between unary and binary operator?
Or
What is sequential statements?
Question 02:
How many type of control satements in c language? Give its names..
Or
Write any five escape sequence with there workings?
Question 03:
Explain defining the problem?
Or
Explain any five shapes of flowchart?
Question 04:
What is candid solutions?
Or
Define c++ programing?
Question 05:
Write three difference between hll and low level languages?
Or
Write difference between syntax and semantic error?
Question 06:
Descirbe function of linker and loader?
Or
What is preprocessor directive? Example?
Question 07:
Why escape sequence is used? Explain with example.
Or
What is format specifiers? examples.
Question 08:
Write code to check whether the number is a prime number or not?
Or
Write a code to chek the highest number from the four number input by user.
Question 09:
Draw a flow chart to print oddf number from 0 to 99?
Or
Write a code to sum even number form 0 to 100?
Question 10:
Write algorithm of factorial of number?
Or
Write a code to print this pattern?
*****
****
***
**
*
Question 11:
Write flow chart of above pattern?

Section-C
Question 01:
Convert to switch statements.
if (fruit == 'a') {
printf("It's an apple!\n");
} else if (fruit == 'b') {
printf("It's a banana!\n");
} else if (fruit == 'o') {
printf("It's an orange!\n");
} else {
printf("It's something else.\n");
}
Or
Convert to for loop.
int i = 0;
while (i < rows) {
int j = 0;
while (j < cols) {
printf("(%d, %d) ", i, j);
j++;
}
printf("\n");
i++;
}

Question 02:
Remove error

#include <stdio.h>
int main()
{
int n = 10;
for (int i = 1: i <= n: i++
{
sum += i;
}

printf("The sum of numbers from 1 to %d is %d\n", n, sum);

return 0
}
Or
Write code for the below pattern?
12345
12345
12345
12345
12345
12345
12345

Question 03:
Write five points how can initialize variable in c language?

Or

Write five points to explain why high-level language is use in coding?

Question 04:
Write a C program to determine the type of a triangle based on its three sides. Use the following criteria:

Equilateral: All three sides are equal.

Isosceles: At least two sides are equal.

Scalene: All three sides are different.

The program should prompt the user to enter the lengths of the three sides of the triangle and then display the
type of triangle.

Or

if (number > 0) {
if (number % 2 == 0) {
printf("The number is: Even Number\n");
} else {
printf("The number is: Odd Number\n");
}
} else if (number < 0) {
printf("The number is: Negative Number\n");
} else {
printf("The number is: Zero\n");
}

return 0;
}

You might also like