Training COMSATS University Vehari Campus

Receiving Certificate from Syed Majid Ali Shah (Deputy Director Information) on 14-01-2015 by Punjab Emergency Service (Rescue 1122)

PM’s Laptop Scheme for Talented Students

Receiving Laptop from Dr. Khair-uz-Zaman (Director COMSATS University Vehari Campus) on 18-02-2015 under Prime Minister’s Laptop Scheme

Convocation SP16 COMSATS University Vehari

Receiving BS (Computer Science) Degree on 07-10-2016 at COMSATS Vehari Campus from Dr. S. M. Junaid Zaidi rector COMSATS University

ESE's Training by QAED GHSS Karampur

Receiving Certificate of Induction Training of ESE's by QAED on 29-08-2017 from Mahmood Arshad Principal GHSS Karampur

SSE (CS) Induction Training by QAED

Receiving Certificate of QAED on 29-08-2017 by Ch. Muhammad Maroof D.E.O (M-EE) Vehari and Afzal Bhatti Principal Govt. Model HSS Vehari

Training on e-Library and e-Learn Punjab

Visited e-Library Vehari on 05-11-2018 for Training of e-Learn using Multimedia Classroom in SED and e-Library

Showing posts with label Computer Notes ICS Part 2. Show all posts
Showing posts with label Computer Notes ICS Part 2. Show all posts

Sunday, June 17, 2018

ICS Part I & II Computer Science Practicals


ICS Part I & II PRACTICALS (50 Marks)
11th Class (25 Marks)
1)      Chapter 8
2)      Chapter 9
Viva Voice
12th Class (25 Marks)
1)      Chapter 6
·         How can you create a table using Wizard?
2)      Chapter 7
·         How you can add a check box object to a form?
3)      Chapter 10
·         Write a program in C Language that takes a temperature in Fahrenheit and converts it to Celsius using the formula Celsius=5/9(Fahrenheit-32).
4)      Chapter 12
·         Write a program in C Language that takes a number and print whether it is odd or even using while loop.
5)      Chapter 13
·         Write a program that inputs two numbers in main function. Passes these numbers to a function. The function displays the product of these number.
Viva Voice

Written by: M.Abid Hussain SST (CS) BS (CS) COMSATS University Vehari Campus  abid.6942694@talmeez.pk

ICS Part 2 Computer Science, Important Questions


Board of Intermediate and Secondary Education Intermediate Part II Computer Science,
Short Questions MS-Access
1.  Describe data manipulation
2.  Define the term Redundancy
3.  List different objectives of the databases.
4.  Define foreign key.
5.  Write down major database objects in MS ACCESS.
6.  Describe field property.
7.  Who is data administrator?
8.  State the use of Query Language.
9.  Differentiate between combo box and list box.
10.  How a relation is formed in database?
11.  What is meant by file organization?
12.  Write some advantages of using MS ACCESS IDE.
13.  What is Master File?
14.  Define Data with example
15.  Describe Data Capturing.
16.  What is Secondary Key?
17.  Define Tuple in Database Structure.
18.  Explain Foreign Key.
19.  Define Feasibility Study.
20.  What is a Key Attribute?
21.  What do you know about Microsoft Access?
22.  Define Wizard.
23.  Differentiate between Sorting and Filtering.
24.  Name any four layouts of Forms in MS Access.
25.  What facilities are offered to the user of database?
26.  Describe Data Interdependence.
27.  Define Database Evolvability.
28.  Explain the concept of File.
29.  Describe Sort Key.
30.  Who is end user of the database?
31.  Define Requirement Analysis.
32.  Define Dependency in Relationship.
33.  What is Microsoft Access IDE?
34.  Explain Microsoft Office Integration of MS Access.
35.  What are wildcards??
36.  What is the difference between Form and Report?
37.  Why additional system overhead in required while designing a database?
38.  Name any two Advance Capabilities offered by DBMS.
39.  What is Access Security used by Database Administrator?
40.  Describe Candidate Key.
41.  Define Row.
42.  Describe Data Elements in a database.
43.  What is Project Planning?
44.  What is Normalization?
45.  Define Redundancy.
46.  What is the shortcut key to open an existing database in MS Access?
47.  What is a join?
48.  What is a sub-form?
49.  Why we need a database dictionary?
50.  Explain Data Share ability.
51.  Define DBMS.
52.  What do you know about Field?
53.  Describe View in Databases.
54.  Explain the concept of Key.
55.  Name any two ingredients of Data Modelling.   
56.  What is Cardinality?
57.  How to you Exit from MS Access?
58.  Define Title Bar of MS Access.
59.  How are relationships defined in MS Access?
60.  Explain Checkbox.
61.  Define Sophisticated Data Security Features.
62.  What do you know by Data Integration?
63.  State Relational Model.
64.  Describe Record.
65.  Define Attribute.
66.  Elaborate Table.
67.  What is Modality?
68.  Define Data Integrity.
69.  Name four objects of MS Access Database.
70.  Define Menu Bar of MS Access.
71.  What are relationships?
72.  Explain Radio Button.
Short Questions C Language
1.  What is variable initialization?
2.  Write shortcut key to compile a program.
3.  How are comments added on multiple lines?
4.  How does a compiler work?
5.  Differentiate between ‘area’ and area.
6.  Give an example of pre-processor directive.
7.  List at least four data types used in C Language.
8.  Write C Statement to print the value of an integer n.
9.  What do you know about format specifier?
10.  Find the error:
Main () {
printf(“Hello”)
}
11.  Describe the used of ampersand (&) in scanf function.
12.  Determine the output of the following code segment:
float p=3.14159;
printf(“p=%5.1f”, p);
13.  Define Computer Program.
14.  What is the first step in develop a program in C Language?
15.  How can you save a C Program in editor?
16.  Explain Long Double Data Type.
17.  What is Arithmetic Underflow?
18.  Define Increment Operator.
19.  Differentiate between Constant and Variable.
20.  Define getch() function.
21.  Why \\ escape sequence character is used?
22.  Find the error:
void main ()
{float y=10; printf(“\c ”,y)
}
23.  Explain %4d field width specifier.
24.  In which header file, scanf() function is present?
25.  What is Linking a C Program?
26.  How can you set the output directories in Turbo C++ Editor?
27.  What is main () function?
28.  Why Assignment Operator is used?
29.  Why Logical Operators are used? Give an example. 
30.  What is Character Constant? Give an example.
31.  What is Long Integer in C?
32.  Write C Statement to print the value of a character c.
33.  What do you know about field width specifier?
34.  Explain %5d field width specifier.
35.  In which header file, scanf() function is present?
36.  Define Constant Macro.
37.  Give any one example of Define Macro.
38.  Write the Syntax of main () function.
39.  What is a Variable?
40.  How multiline comments are added in C Program?
41.  What is Data Type of an Expression?
42.  What are unary operators? Give an example.
43.  Write C Statement to print the value of a float height.
44.  How can you format Floating Point Number while printing?
45.  Find the error:
main ()
{float x;
x=getch(“”);
}
46.  What escape sequence character is used to print a Backspace and Tab?
47.  Determine the output of the following code segment: int p=96; printf(“p\n=\n%d”,p);
48.  What is Body of main Function?
49.  Define Statement Terminator.
50.  Why printf() function is used?
51.  What is the symbol of modulus operator?
52.  How single line comments are added in C Program?
53.  Define arithmetic overflow.
54.  Why arithmetic operators are used?
55.  Explain getche() function.
56.  Why C is called a Strongly typed language?
57.  Find the error:
main () {
int a=10; printf(‘&d’,a);
}
58.  What is the ASCII code for Escape Key?
59.  Determine the output of the following code segment: printf(“Escape Sequence is a \”Cool\”
feature of C.”);
60.  Define Runtime Error.
61.  What is Assembly Language?
62.  Define Structured Programming Language.
63.  What is Identifier in C?
64.  Define Keyword in C.
65.  What is Numeric Constant?
66.  Write any four Relational Operators.
67.  How can you round of 47.5987456 to two decimal point using printf and field width specifier?
68.  Can you use characters using scanf function? Give an example.
69.  Find the error:
main () {
int a=9.5; printf(“&f”,a)
}
70.  Write the syntax of getch function.
71.  Determine the output of the following code segment: int p=12; printf(“p=%d”,a++);
72.  Write an expression in C Language for “Number is divisible by 5”
73.  Define sentinel value.
74.  Define control structure.
75.  Define Function. Why is it used in a program?
76.  What is conditional operator? Write the syntax of conditional operator.
77.  What is the use of File Pointer?
78.  What is the use of if-else statement?
79.  Write two uses or advantages of loop.
80.  What is the scope of local variable?
81.  Write an expression in C Language for “age is from 18 to 25”
82.  What is the difference between Nested if and Sequence of ifs?
83.  Why default label is used in switch statement?
84.  Write the Syntax of Conditional Operator.
85.  For how many times, initialization statement in for loop will execute if loop executes for 10
times?
86.  Can we use while loop in for loop?
87.  What do you know about return type of a function?
88.  What is function call?
89.  Why fclose() function is used?
90.  Write an expression in C Language for “temperature is less than 40.0 and greater than 5.0”
91.  If we omit the braces from the body of if statement, which error message will appear?
92.  Differentiate between inner and outer if statement.
93.  Give an example of ternary operator.
94.  What do you know about nested loops?
95.  Which loop is called counter loop?
96.  What is function header?
97.  Define scope of a variable.
98.  Describe string.
99.  Write an expression in C Language for “speed is not greater than 80”
100.  What data type may be used in switch selection statement?
101.  Is position of default label is fixed in switch statement?
102.  What do know about inner loop?
103.  Which statement is used to transfer control unconditionally?
104.  How many expressions are there in for loop statement? Write all of them.
105.  Define local variable lifetime.
106.  Define lifetime of a variable.
107.  Which function is used to copy a string to an array of characters?
108.  Write an expression in C Language for “w is either equal to 6 or not greater than 3”
109.  What is Repetition Structure?
110.  Can we use if statement without else?
111.  Draw the flow chart for if-else statement. 
112.  Define Iteration.
113.  In which loop structure, condition is tested at the end of loop?
114.  Can a function return more than value? If yes, how?
115.  Why return statement is used in functions?
116.  Write the syntax of fputs() function.  
117.  Write an expression in C Language for “y is greater than x and less than z”
118.  Can we use else without if statement?
119.  Draw the flow chart for nested if statement.
120.  What is if-else-if statement?
121.  What is conditional operator? Write the syntax of conditional operator.
122.  Write the syntax of do-while loop?
123.  Which variable is declared outside of all blocks?
124.  Why functions are used in programs?
125.  Write the syntax of fgets() function.
Essay Type Questions MS Access
1. Write a note on Data types available in MS ACCESS in detail.
2.  What is ER diagram? Explain with the help of an example.
3.  Discuss logical design process in detail. Explain all steps.
4.  How can you find data in a table? Also, write about replacing a data after finding it.
5.  What is Physical Database Design? Define all three major inputs to Physical Database Design.
6.  What is query? Explain types of queries available in MS Access.
7.  Write a detailed note of Data Distribution strategies.
8.  What is Field Size property? What options are sizes are available for number data type?
9.  Explain File Organization in physical database design. What criteria are used for selecting file
organization?
10.  Briefly explain the database design process with the help of a diagram.
11.  Define Table. What are the characteristics of a table? Also, describe the degree and cardinality of a relation.

Essay Type Questions C Language
1.  Briefly describe the basic structure of a C program.        
2.  What is switch () statement? Explain its working with example.      
3.  Define goto statement. Explain it working with program example.
4.  Differentiate between the following:
(i)  Pre-processor Directive and the Compiler                        (ii) Linker and Loader  
5.  What is a high-level language? Write at least 6 common characteristics of high-level languages.
6.  Discuss if-else statement in detail with the help of flowchart.
7.  Write a program that displays the first 15 even numbers using for loop.
8.  Discuss if statement in detail with the help of flowchart
9.  Define do-while loop. Explain it working with program example.
10. What is a programming language? Discuss the two main categories of programming languages.
11. Discuss switch statement in detail with the help of flowchart.
12. Discuss FOR loop in detail with example
13. Define a Bug. Discuss some debugging features of Turbo C++.
14. How many selection statements are available in C? Discuss any two of them in detail.
15. What necessary steps are taken to prepare a C program for execution? Explain with diagram.
16. What is a control structure? Briefly describe the basic control structures for writing program.
17. Define while loop. Explain it working with program example.

Chapter 14 File Handling in C


Computer Notes ICS Part 2 Chapter 14 File Handling in C Short Questions

Q 1. What is data file?
Ans. A data file is a collection of related records. A record is a collection of fields. Any type of data can be stored in data files. Data in data files is stored permanently.

Q 2. What is stream?
Ans. The flow of data from one point to another is called a stream. The point from where data is sent is called source and the point where data is received is called destination.

Q 3. What are different types of streams?
Ans. There are different types of streams used for transfer of data. These are
·                     Input stream
·                     Output stream
·                     Binary stream
·                     Text stream


Q 4. What is text stream?
Ans. A flow of characters from a source to a destination is called text stream. In text stream characters are converted in to bytes. There is no one to one relation between the characters and the bytes. The number of characters and the number of bytes may not be same when characters are converted in to bytes. For example, a new line is stored as a carriage return and line feed pair.

Q 5. What is binary stream?
Ans. A flow of bytes from a source to a destination is called binary stream. No translation is required in binary stream. There is one to one correspondence between the bytes read or written and those on external device. Binary stream is used to transfer any types of data.

Q 6. What is input stream?
Ans. The flow of data from a source to a program is called input stream. For example, C language program reads data from a data file. This flow of data from data file to C program will be input stream.

Q 7. What is output stream?
Ans. The flow of data from a program to a destination is called output stream. For example, C language program write data to a data file. This flow of data from C program to data file is termed as output stream.

Q 8. What is pointer?
Ans. Variable are named memory locations used to store data. Different types of variable can store different types of data. Pointer is a special type of variable. It is not used to store data. It is used to store memory address used by another variable. Like variable, there are different types of pointers. The type of pointer should match the type of variable whose address it is holding.

Q 9. What is file pointer?
Ans. File pointer is a pointer type variable whose type is File. File is a special data type defined in stdio.h header file. When a file is opened, it transfers from secondary storage to main memory. File pointer variable contain information about an opened file. Data files can be accessed with the help of File pointer. File pointer is used to read and write in a data file.

Q 10. What is meant by EOF?
Ans. Text files are stored on secondary storage. Different files have different size. A special end of file marker is used at the end of each text file. This marker is placed after the last character of text file. In C language is denoted by EOF. EOF is used to detect the end of file.

Q 11. What is a string?
Ans. A collection of character enclosed in double quotations is called a string. The variable that is used to store a string is called string variable. C language does not provide any special data type to store string. As string is a combination of characters, a char array is used to store string.

Q 12. What is the purpose of fopen() function?
Ans. A file must be opened before use. We can read from or write into a file only if it is opened. Files are permanently stored on secondary storage. When a file is opened, its data is transferred in main memory. Header file stdio.h contain all standards file handling functions. fopen() function is used to open a file. A file pointer is attached with an open file.

Q 13. What is the purpose of fputs() function

Ans. fputs() function is used to write a string in text file. This function is defined in stdio.h header file before the use of this function the file must be open in write mode or append mode. The general syntax of this function is as follow


·                     fputs(string, file pointer);


Q 14. What is the purpose of fgets() function
Ans. fgets() function is used to read a sting from a text file. This function is defined in stdio.h header file. Before the use of this function, the file must be opened in read mode. The general syntax of this function is as follow:


·                     fgets( str, n, file pointer);


Q 15. What is the purpose of putc() function
Ans. The putc() function is used to write a single character into text file at one time. Before the use of this function file should be opened is write or append mode. The syntax of this function is as follow:


·                     putc(character, file pointer);


Q 16. What is the purpose of getc() function
Ans. getc() function is used to read a single character from a file. More than one characters can be read from a file by using this function repeatedly. Before the use of this function, the file must be opened in read mode.

Q 17. What is the purpose of fprintf() function
Ans. The fprintf() function is used to write data in a file in specified format. Any type of data can be written in a file. The file must be opened in write or append mode before the use of this function. Its general syntax is as follow:


·                     fprintf( fp, Format_string, argument);


Q 18. What is the purpose of fscanf() function
Ans. The fscanf() function is used to read data from a file in specific format. It works like scanf() function but scanf() function take data from keyboard. Its general syntax is as follow:


·                     fscanf( fp, Control-string, Var);


Q 19. What is the purpose of fclose() function

Ans. When a file is open, it is transferred from secondary storage to main memory. A connection is established between C program and file with the help of file pointer. When a file is closed, its contents are transferred from main memory to secondary storage. Its connection with C program breaks. File pointer is destroyed and data of file becomes inaccessible. If a file is not closed properly some data may lose. The function fclose() is used to close a file opened by fopen() function.