suggestion
suggestion
suggestion
1marks
1. Left shift operation is equivalent to?
a) Division by 2 b) Multiplying by 2 c) Adding 2
d) Subtractin
A) To display output
D) To process data
A) 2
B) 8
C) 10
D) 16
Answer: D) 16
20.What is the associativity of the assignment operator = in C?
A) Left-to-right
B) Right-to-left
C) None (no associativity)
D) Depends on the expression
Answer: B) Right-to-left
21.Which of the following was the first large-scale computer to run at electronic
speed?
A) UNIVAC
B) ENIAC
C) EDVAC
D) EDSAC
Answer: B) ENIAC
22.What is the binary equivalent of the decimal number 13?
A) 1101
B) 1011
C) 1110
D) 1001
Answer: A) 1101
23.In C, which of the following operators has the highest precedence?
A) + (addition)
B) && (logical AND)
C) ++ (increment)
D) == (equality)
Answer: C) ++ (increment)
24.What will be the output of the following C code snippet?
#include <stdio.h>
int main() {
int a = 5, b = 10, c = 15;
int result = a < b && b < c || c++ > b;
printf("result = %d, c = %d\n", result, c);
return 0;
}
A) result = 1, c = 16
B) result = 1, c = 15
C) result = 0, c = 16
D) result = 0, c = 15
Answer: B) result = 1, c = 15
25.Question: What is the primary function of the CPU in a computer system?
A) To store data permanently
B) To execute instructions and process data
C) To manage input and output operations
D) To provide power to the computer
Answer: B) To execute instructions and process data
26.The process of drawing a flowchart for an algorithm is called __________
a. Performance b) Evaluation c) Algorithmic Representation d) Flowcharting
27.In C programming, which keyword is used to assign meaningful names to
existing variable types, making the code more readable?
A) typedef
B) enum
C) bool
D) void
Answer: A) typedef
5marks
1. Explain precedence and associativity of operators with suitable examples.
2. What is a compiler? List names of any 2 compilers.
What are the benefits of designing a flowchart for solving a problem? [3+2]
3. Difference between compiler and interpreter .
4. Define Algorithm. Write an algorithm to find the area and perimeter of a circle
5. Draw the flowchart and write a C program to compute simple interest.
6. Discuss about Programming errors in C.
7. Define a computer and explain its basic functions.
8. Summarize the evolution of computers from the Difference Engine to the
Apple I.
9. A.Convert (A2DE.25)16 TO DECIMAL.
B.Convert (345.75)8 to Hexadecimal.
10.Define the different types of operators in C and provide examples for each.
11.Explain how each type of operator is used in programming with sample code
snippets.
12.Describe the difference between if-else and switch statements with examples.
13.Explain the different types of input devices. How do they facilitate user
interaction with a computer? Discuss at least three types of input devices and
their functions.
14.Explain different flowchart symbols with name and example.
15.Write the basic structure of C and explain.
10marks
1. A.Draw a flowchart for finding greatest among three numbers. Follow the
proper order according to the given algorithm, while creating the flowchart.
Let x, y and z be the numbers.
Now, we can follow the algorithm below to determine the greatest number
among the three:
Read the three numbers.
If x > y
If x > z,
then x is the greatest number.
Else, z is the greatest number
Else, If y > z,
then y is the greatest number.
Else, z is the greatest number.
B.Write the advantages and disadvantages of flowchart.
2. A.Briefly explain tokens with example.
B. Explain different types of data types.
3. Using a for loop, write a program that calculates the factorial of a given
number. Include comments explaining each part of the code.
4. Show briefly operators precedence and associativity with example .