10th Class Computer T7
10th Class Computer T7
ACADEMY ACADEMY
Main Dullu Khurd Near Rescue 1122 Feroz Pur Road Lahore Main Dullu Khurd Near Rescue 1122 Feroz Pur Road Lahore
0322 478 8317 0322 478 8317
Name: Roll #: Subject: Computer-10 Test #: 2671604 Name: Roll #: Subject: Computer-10 Test #: 2671604
Test Detail: Type 7 - Short Test (MCQs=5, SQs=7/11, LQs=2/3) Total=35 Time: Test Detail: Type 7 - Short Test (MCQs=5, SQs=7/11, LQs=2/3) Total=35 Time:
Syllabus: U-4, Date: 10-Jan-2025 Syllabus: U-4, Date: 10-Jan-2025
1. A B C D 3. A B C D 5. A B C D 1. A B C D 3. A B C D 5. A B C D
2. A B C D 4. A B C D 2. A B C D 4. A B C D
1- Circle the correct answer. (5x1=5) تس 1- Circle the correct answer. (5x1=5) تس
در وجابےکرگددارئہاگلںیئ۔-1 در وجابےکرگددارئہاگلںیئ۔-1
i. _______ is the output of the following code:
ٹپ
درجذلیوکڈیکآؤٹ ۔۔۔۔۔ےہ۔ .i i. _______ is the output of the following code:
ٹپ
درجذلیوکڈیکآؤٹ ۔۔۔۔۔ےہ۔ .i
int n {4} = {8,7,6,3,} int n {4} = {8,7,6,3,}
printf ("%d", n[3]); printf ("%d", n[3]);
3 (D) 1 (C) -1 (B) 0 (A) 3 (D) 1 (C) -1 (B) 0 (A)
ii. Which one of the following is the size of int arr [5]: : اکاسزئایکوہاگint arr [5] .ii ii. Which one of the following is the size of int arr [5]: : اکاسزئایکوہاگint arr [5] .ii
5 (D) 6 (C) 2 (B) 4 (A) 5 (D) 6 (C) 2 (B) 4 (A)
iii. What is the index number of the last element of an اراکنواےلارےےکآرخیرنکاکاڈنسکیایکوہاگ؟7 .iii iii. What is the index number of the last element of an اراکنواےلارےےکآرخیرنکاکاڈنسکیایکوہاگ؟7 .iii
array with 7 elements? array with 7 elements?
3 (D) 6 (C) 5 (B) 7 (A) 3 (D) 6 (C) 5 (B) 7 (A)
iv. What will be the output of this code? :اسوکڈیکآؤٹٹپ وہیگ .iv iv. What will be the output of this code? :اسوکڈیکآؤٹٹپ وہیگ .iv
voidabc ( ) voidabc ( )
{ {
printf(“Punjab”); printf(“Punjab”);
} }
Pakistan (D) Pak (C) Pun (B) Punjab (A) Pakistan (D) Pak (C) Pun (B) Punjab (A)
v. How many times “Punjab” will printed by using the "ینتکدہعفرپٹن وہاگ؟Punjab"اورپدییئگٹنمٹیٹسےکذرےعی .v v. How many times “Punjab” will printed by using the "ینتکدہعفرپٹن وہاگ؟Punjab"اورپدییئگٹنمٹیٹسےکذرےعی .v
above statement? above statement?
for ( a = 0 ; a < = 4; a + + for ( a = 0 ; a < = 4; a + +
{ {
print f (“Punjab”); print f (“Punjab”);
} }
5 (D) 3 (C) 2 (B) 1 (A) 5 (D) 3 (C) 2 (B) 1 (A)
2- Answer short questions. (4x2=8) وساالتےکرصتخموجاابتےئھکل۔4 وکیئےس-2 2- Answer short questions. (4x2=8) وساالتےکرصتخموجاابتےئھکل۔4 وکیئےس-2
i. Which data type is used to measure the height of any یسکاطبل ملعےکدقیکامیپشئےکےیلوکنیسڈاٹیاٹپئ اامعتسلرکےتںیہ؟ .i i. Which data type is used to measure the height of any یسکاطبل ملعےکدقیکامیپشئےکےیلوکنیسڈاٹیاٹپئ اامعتسلرکےتںیہ؟ .i
student? student?
ii. Declare an array of type float that can store 5 values. :درجذلیوکڈںیمیطلغیکآوٹٹپ ےئھکل .ii ii. Declare an array of type float that can store 5 values. :درجذلیوکڈںیمیطلغیکآوٹٹپ ےئھکل .ii
iii. Write the output of the following code; :درجذلیوکڈیکآوٹٹپ رحتریےئجیک .iii iii. Write the output of the following code; :درجذلیوکڈیکآوٹٹپ رحتریےئجیک .iii
int a = 4,b; int a = 4,b;
float c = 2.3; float c = 2.3;
b = c * a; b = c * a;
printf ("%d" , b); printf ("%d" , b);
iv. Identify the errors of this code: :اسوکڈںیمویطلغںیکاشندنیہےیجیک .iv iv. Identify the errors of this code: :اسوکڈںیمویطلغںیکاشندنیہےیجیک .iv
int a; int a;
if (a>40) if (a>40)
printf(PASS); printf(PASS);
v. What will be the output of the following code? :درجذلیوکڈیکآوٹٹپ اتبےیئ .v v. What will be the output of the following code? :درجذلیوکڈیکآوٹٹپ اتبےیئ .v
float height = 5,8 ; float height = 5,8 ;
Printf(*height = % 2f " , height); Printf(*height = % 2f " , height);
لک لک
vi. Write down the name of parts of for loop syntax. ولپےکڈاھےچنےکوصحںےکانم ھیے۔for .vi vi. Write down the name of parts of for loop syntax. ولپےکڈاھےچنےکوصحںےکانم ھیے۔for .vi
3- Answer short questions. (3x2=6) ےکرصتخموجاابتےئھکل۔3 درجذلیوساالتںیمےس-3 3- Answer short questions. (3x2=6) ےکرصتخموجاابتےئھکل۔3 درجذلیوساالتںیمےس-3
i. Write output of following code. :درجذلیوکڈیکآؤٹٹپ ںیھکل .i i. Write output of following code. :درجذلیوکڈیکآؤٹٹپ ںیھکل .i
for (int i = 0; i <2; i++) for (int i = 0; i <2; i++)
printf ("Pakistan\n"); printf ("Pakistan\n");
ii. Write the output of this code. اسوکڈیکآٗوٹٹپ ںیھکل۔ .ii ii. Write the output of this code. اسوکڈیکآٗوٹٹپ ںیھکل۔ .ii
int x; int x;
for (x = 0 ; x < 3; x++) for (x = 0 ; x < 3; x++)
printf(" \n"); printf(" \n");
iii. Identify the errors of this code. اسوکڈںیمویطلغںیکاشندنیہرکںی۔ .iii iii. Identify the errors of this code. اسوکڈںیمویطلغںیکاشندنیہرکںی۔ .iii
for (int x = 0; x < 5 ; x ++) for (int x = 0; x < 5 ; x ++)
printf("PAKISTAN"); printf("PAKISTAN");
iv. Write the Output of the following code: :درجذلیوکڈیکآٗوٹٹپ ںیھکل .iv iv. Write the Output of the following code: :درجذلیوکڈیکآٗوٹٹپ ںیھکل .iv
int i [4] = {101, 102, 103, 104}; int i [4] = {101, 102, 103, 104};
printf (“%d”, [2]);
ن ٹ printf (“%d”, [2]);
ن ٹ
v. Write the general structure of a nested loop. )اکڈاھہچنرحتریرکںی۔Nested loop(یس ڈولپ .v v. Write the general structure of a nested loop. )اکڈاھہچنرحتریرکںی۔Nested loop(یس ڈولپ .v
Answer any 2 long questions. (2x8=16) وساالتےکیلیصفتوجاابتےئھکل۔2وکیئےس Answer any 2 long questions. (2x8=16) وساالتےکیلیصفتوجاابتےئھکل۔2وکیئےس
ٹ ٹ
4 Write a program using for loop to print factorial of any " ولپوکاامعتسلرکےتوہےئیسکیھبربمنفیک ورلیرپٹن رکےناکرپورگامرحتریےئجیک۔for" 4 Write a program using for loop to print factorial of any " ولپوکاامعتسلرکےتوہےئیسکیھبربمنفیک ورلیرپٹن رکےناکرپورگامرحتریےئجیک۔for"
4 4
number. number.
5 Write a program using a for loop in C-Language that 35ات25 ولپوکاامعتسلرکےتوہاکی رپورگامانبںیئوجfor وگنیلجئںیمC 5 5 Write a program using a for loop in C-Language that 35ات25 ولپوکاامعتسلرکےتوہاکی رپورگامانبںیئوجfor وگنیلجئںیمC 5
prints even numbers from 25 to 35. تفجادعادرپٹن رپٹن رکے۔ prints even numbers from 25 to 35. تفجادعادرپٹن رپٹن رکے۔