0% found this document useful (0 votes)
30 views

Leader'S Acadmey: Q.1: Choose The Correct Answer.

The document contains a test for a 10th grade computer class. It has multiple choice and short answer questions testing knowledge of C programming fundamentals like data types, operators, comments, and variable naming conventions. It also contains a question asking to write a program to swap the values of two integer variables.

Uploaded by

MUHAMMAD RASHID
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

Leader'S Acadmey: Q.1: Choose The Correct Answer.

The document contains a test for a 10th grade computer class. It has multiple choice and short answer questions testing knowledge of C programming fundamentals like data types, operators, comments, and variable naming conventions. It also contains a question asking to write a program to swap the values of two integer variables.

Uploaded by

MUHAMMAD RASHID
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

LEADER’S ACADMEY ®

RANA TOWN MARAKA


Date: 14-01-2022 Time: 25 min
Class: 10th Test: Computer Chapter#1,2 Total Marks: 25
Name: __________________________________________
Q.1: Choose the correct answer. (10)
i. Include statement are written in -----------sectioin
(a) header (b) main (c) comments (d) print
ii. A float uses ------------bytes of memory.
(a) 3 (b) 4 (c) 5 (d) 6
iii. For initialization a variable we use ---------- operator.
(a)  (b) = (c) @ (d) ?
iv. Printf is used to print----------------- type of data.
(a) int (b) float (c) char (d) All of them
v. Scanf is a -------------- in C programming language.
(a) Keyword (b) library (c) function (d) none of them
vi. Which operator has highest precedence among the following:
(a) / (b) = (c) > (d) !
vii. The operator % is used to calculate
(a) Percentages (b) Remainder (c) Factorial (d)Square
viii. Which of the following is valid character.
(a) ‘lahore’ (b) “a” (c) ‘9’ (d) None of them

ix. How many types of comments is C Programming.


(a) 3 (b) 5 (c) 2 (d) 1
x. Which of the following is not a type of operator
(a) Arithmetic operator (b) Relational operator (c) check operator (d) logical operator

Q.2: Give the short answers to the following questions. (10)


i. Define statement Terminator.
ii. What is the difference between scanf and getch?
iii. Write the output of the following code.

#include<stdio.h>
void main ()
{
int a = 4, b;
flaot c = 2.3;
b = c* a ;
printf (“%d”, b);
} Output=

iv. Difference between IDE and Compiler.


v. What is Reserved words? And also write any five names.
vi. Write any three Rules of variable naming.

Q.3: Write the answer of the following long question.

(a) Write a program that swaps the value of two integer varables. (5)

BEST OF LUCK ☺

You might also like