Professional Documents
Culture Documents
2nd Year Important Quesions (2023) PDF
2nd Year Important Quesions (2023) PDF
2nd Year Important Quesions (2023) PDF
ACADEMY
AL DEEN ACADEMY
GHOSIA INSTITUTE OF TECHNOLOGY
ADDRESS : TALAT PARK 30 FT ROAD , LAHORE
Sir Asif Ashiq : 0328-3600060 Sir Saqib Ali : 0326-5864707
AL DEEN SCIENCE & ARTS
ACADEMY
Long Question
1) What necessary steps are taken to prepare a C program for execution? Explain
with diagram .
2) Describe debugging . Explain different types of errors
3) Write some characteristics of C language
4) Define language processor or translator Also discuss different
types of language processors.
5) Describe the characteristics of High Level Language
AL DEEN ACADEMY
GHOSIA INSTITUTE OF TECHNOLOGY
ADDRESS : TALAT PARK 30 FT ROAD , LAHORE
Sir Asif Ashiq : 0328-3600060 Sir Saqib Ali : 0326-5864707
AL DEEN SCIENCE & ARTS
ACADEMY
2 Elements Of C
16)Write two difference between constant and variable 17 ) Define identifer ? 18) What is variable initialization ?
19) Write a statement to declare an integer variable i initialized to 10 20) Define field width ?
21) What is increment Operator ? 22) Compound Assignment Operator ?
23) Deermin the output int number = 6 ; printf(“%d/n”,number++);
24) Determine the output printf(“Hello /nWorld/n Pakistan “ );
25) Convert the following conditional expression into if else statement
28) Trac the output
X < 0 ? y = 10 ; z = 20 ;
26) Differentiate between declaring and defining a variable ? Void main(){
27) Trac the output Int a , n , b;
Void main(){ n = 100 ;
P= 3.141593 a = n%100;
Int x , y ; b = n /10;
X = 10 ; n = n%10;
Y = 30 ; printf(“Result = %d%d %d “, n , b , a );
Z=x+y; getch();
printf(“ Result = “,z); }
getch();
}
Long Questions
AL DEEN ACADEMY
GHOSIA INSTITUTE OF TECHNOLOGY
ADDRESS : TALAT PARK 30 FT ROAD , LAHORE
Sir Asif Ashiq : 0328-3600060 Sir Saqib Ali : 0326-5864707
AL DEEN SCIENCE & ARTS
ACADEMY
1) Evaluate the following expressions 2) Explain the following Data types
Int a = 1 , b = 3 , c = 5 , d = 6 ; ( i ) float ( ii ) Double ( iii ) int
Double = x = 1.0 ;
( i ) a > b && c < d ( ii ) a < ! b II !! a
(iii) ( a + b ) * c (iv) c * d / x
3 INPUT / OUTPUT
AL DEEN ACADEMY
GHOSIA INSTITUTE OF TECHNOLOGY
ADDRESS : TALAT PARK 30 FT ROAD , LAHORE
Sir Asif Ashiq : 0328-3600060 Sir Saqib Ali : 0326-5864707
AL DEEN SCIENCE & ARTS
ACADEMY
Long Questions
1) Describe Printf() and scanf() functions in detail
3) Write a program in c language that takes 4 numbers As input and display product and
sum of the given numbers
4 Decision Structure
1) What do you mean by selection structure . 2) Which data type is used in “switch” stament’s
expression ?
3) Why should you use default in switch statement ? 4) What are conditional statements ?
5) Define if-else statement 6) What is switch structure ?
7) Define the use of if-statement ? 8) Write syntax of conditional operator ?
9) Define Control Structure ? 10) What do you mean by selection ?
11) Write three advantages of switch statement. 12) What happens if break statement is missed in
case block ?
13) Determine of the following code 14) Trac the output
if( 1 != 2) Void main(){
Int R ;
printf(“ok”);
R = 25 ;
else IF( R > = 0 )
{
printf(“Correct it”);
R = 3.14 * R * R ;
15) What is reprographics ? } else
printf(“ Positive Number “);
getch();
AL DEEN ACADEMY
GHOSIA INSTITUTE OF} TECHNOLOGY
ADDRESS : TALAT PARK 30 FT ROAD , LAHORE
Sir Asif Ashiq : 0328-3600060 Sir Saqib Ali : 0326-5864707
AL DEEN SCIENCE & ARTS
ACADEMY
Long Questions
1) What is control structure ? Breifly describe the basic control structure for
writing programs .
2) Explain the difference between if and if-else using example .
3) What is nested if explain with example ?
4) Write a program that display first 10 natural numbers using any Loop .
5) Write a program that takes three numbers as input and display the minimum number
using nested if statements
6) What is loop ? Explain for Loop ?
7) Define and explain switch statement with example
8) Write a program in C language that display first five numbers and display sum of the
numbers using while loop .
9) Explain if-else-if statement with flowchart , syntax and program .
10) Write a program In C language that display even numbers from 1- 100 and also show
the sum of the numbers
11) Write a program in C language that takes marks from user and show “ PASS “ if the
marks are greater then 40 .
12) Write a program that takes three numbers as input and dislay the largest number .
5 LOOP CONSTRUCTS
6 Function in C
1) What is the life time of global variable ? 2) List different ways to pass parameters in function ?
3) What are formal parameters 4) What is the use of actual Parameter ?
5) What is local variable ? 6) Difference between built-in function and User defined Function?
7) How a function return a value ? 8) How is the data is provided to the functions ?
9) Why we use parameters in functions ? 10) Explain scope of a global variable in C ?
11) What is function ? 12) Define user defined function ? 13) What is local Variable ?
14) What is function definition ? 15) What is function call ?
Long Questions
1) How functions are declared and defined ? why we use functions in a
program ?
2) Write a program to compute the area of a rectangle when length and width
Are passed by ( Area = Length x Width )
AL DEEN ACADEMY
GHOSIA INSTITUTE OF TECHNOLOGY
ADDRESS : TALAT PARK 30 FT ROAD , LAHORE
Sir Asif Ashiq : 0328-3600060 Sir Saqib Ali : 0326-5864707
AL DEEN SCIENCE & ARTS
ACADEMY
7 File Handling C
This notes are designed in this way that by preparing this notes you can gain better marks in Final Exams . Chapter
Special Thanks for Noor Ul ain for notes designing in unique style .
AL DEEN & GIT platforms are inshallah providing more notes is just for the learners …
Email IDS :