0% found this document useful (0 votes)
78 views1 page

Old Shalimar Academy Old Shalimar Academy Old Shalimar Academy Old Shalimar Academy

The document is a test for a Class 12 exam on Chapter 11 of the C programming language syllabus. It contains 14 multiple choice and short answer questions testing concepts related to functions in C including: 1) Questions ask about formal vs actual parameters, function declarations vs definitions, passing values to functions, returning values from functions, local vs global variables, and writing functions to perform tasks like checking prime numbers or finding the maximum of two numbers. 2) Short answer questions ask students to describe writing functions in C, distinguish formal and actual parameters, explain the lifetime of local vs global variables, write syntax for function headers and returns, and write programs that pass values to and from functions to perform calculations. 3)

Uploaded by

Ahsan Mughal
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)
78 views1 page

Old Shalimar Academy Old Shalimar Academy Old Shalimar Academy Old Shalimar Academy

The document is a test for a Class 12 exam on Chapter 11 of the C programming language syllabus. It contains 14 multiple choice and short answer questions testing concepts related to functions in C including: 1) Questions ask about formal vs actual parameters, function declarations vs definitions, passing values to functions, returning values from functions, local vs global variables, and writing functions to perform tasks like checking prime numbers or finding the maximum of two numbers. 2) Short answer questions ask students to describe writing functions in C, distinguish formal and actual parameters, explain the lifetime of local vs global variables, write syntax for function headers and returns, and write programs that pass values to and from functions to perform calculations. 3)

Uploaded by

Ahsan Mughal
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/ 1

Old Shalimar

Test Session 2021 Class: XII


Test Session 2021 Class: XII Name________________ Test(3): CMP Chap 11 Total time: 1 hr
Test#3 Class: 2nd Year Syllabus: Ch#13 Total Marks: 35
Q#1: Choose the correct answer. (1*7=7)

Academy
1. The parameters in function declaration are called:
a) Actual parameter b) Formal parameter c) Both A and B d) None
2. Multiple arguments to a function are separated by:
a) Comments b) semicolons c) Colons d) Commas
3. A built-in-function:
a) Can’t redefine b) Can be redefine c) Can return a value d) None
4. Function definition can be written:
a) Before main()function b) After main()function
c) In a separate file d) All of these
5. Function declaration consist of:
a) Function Name b) Function return type
c) No and types of parameter d) All of these
6. Global variables are created in:
a) RAM b) ROM c) Hard Disk d) None
7. Local variable are also called:
a) Automatic b) Global c) Normal d) None

Q#2: Answer these short Question.


1) Briefly describe the process of writing a function in C language?
2) Distinguish between formal and actual parameter?
3) Explain Diff between local and global variable by their lifetimes?
4) How does a function return a value? Write syntax!
5) Write a program that’s display first ten numbers using a user-defined function?
6) Define function header? Write syntax!
7) How to call the function by arithmetic expression?
8) What is meant by function prototyping give an example (syntax)?
9) Write a program that takes two numbers from user and passes it to a function which shows
the maximum number.
10) Differentiate between function definition and function declaration?
11) Write a program that checks a number whether is a prime or not using user-defined?
12) Write a program in C language that inputs a number, passes it to a function, the function
will return it after incrementing it by 10, The increment number is displayed by main()?
13) Write a program that takes two number from the user in main and a function will check
which number is maximum simple call the function in main to get the answer?
14) int add(int x, int y); void main()
{
Int a,b,c
A=10, B=23, c;

You might also like