0% found this document useful (0 votes)
27 views4 pages

Question 01

This document contains 11 sections with questions about computer science concepts like operators, control statements, flowcharts, functions, loops, patterns, and conditional statements. It provides example code and asks the user to identify errors, write algorithms, and convert between different programming structures like if-else statements and switch statements. The questions cover a range of core programming topics for an introductory computer science course.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views4 pages

Question 01

This document contains 11 sections with questions about computer science concepts like operators, control statements, flowcharts, functions, loops, patterns, and conditional statements. It provides example code and asks the user to identify errors, write algorithms, and convert between different programming structures like if-else statements and switch statements. The questions cover a range of core programming topics for an introductory computer science course.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 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

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy