All Notes-XI Chapter 4 to 12
All Notes-XI Chapter 4 to 12
I mproveme nt Notes
Chapter 4
Principles of Programming and Problem Solving
3 Marks
1. Write the advantages of flow charts?
a. Better communication
b. Effective analysis
c. Effective synthesis
d. Effective coding.
2. Write the limitations of flow charts?
a. Very time consuming and laborious .
b. Any change made in the algorithm causes the replacement of existing flowchart with a completely
new flow chart.
c. Lack of standards to determine the amount of details included in a flow chart.
3. Distinguish between Entry Controlled Loop and Exit Controlled Loop?
Suitable when skipping of the body from Suitable when normal execution of the
being executed is required body is to be ensured
4. Distinguish between source code and object code?
The program written in any high level language is known as source code.
The binary code obtained after successful compilation of the source code is known as object code.
4|Page
Co mp.Sc.I mproveme nt Notes
Chapter 6
Data Types and Operators
2 Marks
1. Distinguish between L-value and R-value of a variable?
The address of a memory location is called L-value. The content of a memory location is called R-value.
2. What are operators? Explain with examples?
Operators are symbols used to perform operations. The variables on which the operators
performs operations is called operands. Ex: +, -, <<, >> etc.
3. Write various methods to write comments in C++?
i. Single line comments ii. Multiline comments
4. Explain different aspects of a variable?
There are three important aspects associated with a variable. They are,
i. Variable name ii.Memory address (L-Value) iii. Content (R-Value)
5. Classify operators on the basis of number of operands required for the operation?
i. Unary Operators: Example: Unary +, Unary - , ++j, i- -
ii. Binary Operators: Example: +,-,*,/,%
iii. Ternary operators: Example: ?:
6. Define data type? Classify it?
Data types means the nature of data Data type is classified into three. They are,
i. Fundamental data type: Example: int, float, char, double, void.
ii. User defined data type: These are data types defined by the user. Example: Structure,
Class.
iii. Derived data type: Example: arrays, pointers, functions.
5 Marks
7. Explain different types of expressions used in C++ programs?
i. Arithmetic expression: Expressions that contains only arithmetic operators. Ex: a/b,
a+b, a-b Arithmetic expressions are again classified into two.
a. Integer expression b. Real expression(floating point expression)
ii. Relational expression: The expressions that contain relational operators are known as
relational expressions. Ex: x>y, x<y, x!=y.
iii.Logical expression: Expressions that combine two or more relational expressions with
logical operators are known as Logical expressions. Ex: x>5 && x<1, x==5||y==5
8. Classify operators on the basis of the nature of operation?
i. Arithmetic operators: Used to perform addition, subtraction, multiplication, division
and modulus. The operators used are +,-,*, /, %.
ii. Relational operators: Used to compare two values. Ex: <,>,<=,>=,==,!=.
iii. Logical operators: These are operators used to combine the results of two relational
expressions. Ex: Logical OR (||), Logical AND (&&), Logical NOT (!)
iv. Input/Output operators: Used to perform input/output operations. EX: <<, >>
v. Assignment operator: Used to store values in memory locations. Ex: a=x+y, a=55.
vi. Sizeof operator: It gives us the amount of memory space allocated for the operand..
Ex: sizeof(int).
9. Write a short note on different types of statements used in C++ program?
Statements are the smallest executable unit of a programming language.
i. Declaration statement: It is used to declare variables in a program. Ex: int a; float x;
ii. Assignment statement: It is used to assign values to a variable. Ex: a=15, a=b
iii. Input statement: It is used to store data given through the keyboard into the memory
Ex: cin>>x;
iv. Output statement: It is used to transfer data from memory to output device. Ex:
cout<<a;
6|Page
Co mp.Sc.I mproveme nt Notes
CHAPTER 7
Control Statements
1. Write about control statements ?
Control statements are statements used to alter the normal flow of program
execution. It is classified into two,
a) Decision making / Selection statements.
b) Iteration statements.
2. Explain decision making / selection statements with examples?
The statements used for selected execution are called decision making / selection statements.
Ex: if and switch statements.
3. Write the syntax of if statement?
if (test expression)
{
statement block;
}
4. Write the syntax of if …. else statement?
5. Write the syntax of if-else if?
if (test expression)
if (test expression 1)
{
{
statement block 1;
statement block1;
}
else if(test expression 2)
else
statement block2;
{
…………………….
statement block 2;
else
}
statement block n;
}
6. Write the syntax of switch statement?
switch(expression)
{
Case constant_1 : statement block1;
break;
Case constant_2 : statement block1;
break;
:
:
Case constant_n-1 : statement block n-1;
break;
default : statement block n;
}
7. Distinguish between switch and else if ladder statements?
switch statement else if ladder
Evaluates conditions with equality Evaluates any relational or logical
operator only expression.
Case constant must be an integer or Condition may include range of
character type value values and floating point constant.
When no match is found default When no expression evaluates to
statement is executed. true else block is executed.
break statement is required to exit Program control will automatically
from switch statement. goes out after the completion of a
block.
7|Page
Co mp.Sc.I mproveme nt Notes
8|Page
Co mp.Sc.I mproveme nt Notes
Chapter 8
Arrays
1. Define Arrays?
An array is a collection of elements of the same type placed in contiguous memory locations.
2. Array position in which elements are stored is known as …………..?
Ans. Index Number or Subscript.
3. Write the syntax and example of array declaration?
Syntax: data_type array_name[size];
Ex: int num[10];
4. Write the formula for calculating the total size of a single dimensional array?
Total_bytes = sizeof(array_type) X size_of_array.
5. Write different ways of array initialization?
Arrays can be initialized in two ways.
1. Ex: int mark[5]={34,23,55,45,50};
6. int mark[ ]= {34,23,55,45,50}; Array elements can be accessed using …………………?
Ans. Index Number or Subscript.
7. Explain the three different operations performed on arrays? (3)
The operations performed on array are Traversal, Sorting, Searching, insertion deletion and
merging.
i. Traversal: It is the process of visiting all the elements in an array in order to perform any
operation on them.
ii. Sorting: Process of arranging the elements of array in ascending or descending order.
iii. Searching: It is the process of finding the position of a given element in an array.
8. Write different types of sorting algorithms?
i. Selection sort
ii. Bubble sort
9. Write different types of searching algorithms?
i. Linear search ii. Binary search.
Chapter 9
String Handling and I/O Functions.
1. Explain the use of Null character in a character (‘\0’) array? (3)
When we store a string in a character array the Null character (‘\o’) will be
stored at the end of the string automatically.
2. Write the demerit of using cin for inputting strings in C++ programming? How can we overcome it? (3)
We cannot input strings containing white space. We can overcome this problem by using gets( ) function.
3. Explain the use of console string I/O functions with example? (3)
OR Differentiate gets( ) and puts( ) functions?
gets(): Used to input a string of characters including whitespaces. Ex: gets(str)
puts( ) Used to output string data stored in a character array on the monitor. Ex: puts(str)
4. Explain the use of console character input functions with example? (3)
get( ) this function can be used to input a character or string data. Ex: cin.get(ch); , getline(str,10);
getline( ) this function can be used to input a string data. Ex: getline(str,len);
The header file iostream contains definitions of get() and getline().
5. Explain different types of stream output functions with examples? (3)
put( ) and write ( ) are known as stream output functions. put( ) is used to output character
data and write( ) function is used to output string data. The header file iostream contains definitions of put( )
and write( ) functions.
Ex: cout.put(ch); , cout.write(str,10);
9|Page
Co mp.Sc.I mproveme nt Notes
Chapter 10
FUNCTIONS
1. What is modular programming? (2)
Modular programming is a programming method in which large problems
are divided into small sub problems. These sub problems can be solved by writing separate programs.
2. The process of breaking down programs into smaller sub programs is known as ………………. ?
Ans. Modularization. (1)
3. What are the advantages (merits) of modular programming?
i. Less chance of error occurrence
ii. Reduces Programming complexity
iii. Reusability of functions:- Reusability of functions reduces length of the program.
4. Define function? (2)
Functions are sub programs. Functions performs specific task.. Ex: strlen(), getch().
5. What are the different types of functions? (3)
Functions are classified into two. They are,
a. Predefined functions or Builtin functions
These functions are part of the compiler package. These are functions which are previously defined
within the header files. Ex: exit(), sqrt(), pow().
b. User defined functions
These are functions defined by the user within a program.
Syntax of function definition:
data_type function_name(argument_list)
{
Statements in the function body;
}
6. Data type of a function is also known as …………….. ? Ans. Return type. (1)
7. Explain function prototype with syntax? (2)
Function prototype is the declaration statement of a function,
Syntax: data_type function_name(argument_list); Ex: int fact(int);
8. Define parameters or arguments? (2)
Parameters or arguments are data or values passed from the calling function to the called
function. Ex: Cube(x); where x is the parameter.
9. Explain different types of arguments(parameters)? (2)
Arguments or parameters are classified into two. They are
a. Formal arguments:- The variables used as arguments in a function definition are known as formal
arguments.
b. Actual arguments:- Arguments in the function call are known as actual arguments.
12. What are the different function calling methods? (I)
Function calling methods can be classified as
a. Call by value (Pass by value) method
b. Call by reference (Pass by reference)
13. What do you meant by scope of a variable? (1)
Scope of a variable means part of the program where the variable can be used.
14. Distinguish between local variables and global variables? (2)
Local variables are variables declared within a function or a block of code.
Global variables are variables declared outside all the functions.
16. What is recursive function? (2)
A function that calls itself is known as recursive function.
17. The process of calling a function by itself is known as ………………. ? Ans. Recursion. (1)
18. Write about any three string unctions? (3)
i. strlen( ) – Used to find the length of a string. Ex: strlen(“Computer”)
10 | P a g e
ii. strcpy( ) – Used to copy one string into another. Ex: strcpy(s1,s2);
iii. strcmp( ) - Used to compare two strings. Ex: strcmp(s1,s2);
19. Write about any three Mathematical unctions? 3
i. sqrt( ): Used to find the square root of a number. Ex: sqrt(25);
ii. abs( ): Used to find the absolute value of a number. Ex: abs(-25);
iii. pow ( ): Used to find the power of a number. Ex: pow(5,2);
20. Write about any three Character functions? 3
i. isupper( ): Used to check whether a character is in upper case or not. Ex: isupper(‘D’);
ii. islower( ): Used to check whether a character is in lower case or not. Ex: islower(‘d’);
i. isalpha( ): Used to check whether a character is alphabet or not. Ex: isalpha(‘A’);
Chapter 12
Internet & Mobile computing
One Mark
1. ................is considered as the first wide area network? Ans. ARPANET.
2. ................is considered as the father of internet? Ans. Vinton Grey Cerf.
3. ...............protocol is used as communication protocol in internet? Ans. TCP/IP.
4.Who proposed the idea of world wide web? Ans. Tim Berners Lee
5. What is extranet?
Ans. An intranet that can be accessed by authorized outside users is known as extranet.
6. The software used to navigate through web pages in a world wide web is called ..............?Ans. Web browser.
7. Define browsing?
Ans. The process of navigating through the web pages of world wide web is called browsing.
8. Write the general structure of e-mail? Ans. user name@ domain name.
9. The protocol used for e-mail transmission is..........? Ans. SMTP( Simple Mail Transfer Protocol )
10. Unwanted e-mails sent indiscriminately to a person are called ...........? Ans. Junk mails or Spams.
11. The hackers who performs illegal activities to find the vulnerabilities in a network are called...........?
Ans: Grey hat hackers.
12. Define spoofing?Ans.It is the act of creating misleading websites to get unauthorized access to a users system.
13. What is quarantine? Ans. It is a special area for storing files infected with viruses.
Two Marks
14. Write the uses of internet?
i. To communicate with people. ii. To search information. Iii. To do online shopping.
15. What is ARPANET? Ans. It is the first form of internet. It is considered as the first wide area network.
16. Distinguish between internet and intranet?
Internet is an interconnected system of computer networks all over the world.
Intranet is a private computer network within an organization.
17. Write the software and hardware requirement for connecting a computer to the internet?
i. A computer with NIC and operating system. ii. Modem. iii.Telephone connection.
iv.An internet account. v.A browser software.
18. Write the uses of Browser?
Browser is a software used to navigate through web pages in the World Wide Web. Ex: Google Chrome, Mozilla Firefox.
19. What are search engines? Give examples?
Search engines are special programs used to find information available in World Wide Web. Ex: Google, Bing.
20. What are the advantages of e-mails?
i.Very high speed. ii. Very easy to use. iii. Less expensive.
21. Write about computer viruses?
Computer virus is a program that can spread from one computer to another. A virus program can delete or
damage data stored in a computer.
22. Define Computer worm?
A computer worm is a malicious program that spread from one computer to another.
23. What you mean by Trojan Horse?
Trojan Horse is a malicious software that can delete files or destroy information stored in a computer.
24. What are Spams?Ans. Spams are e-mails sent indiscriminately to persons to promote a product or service.
25. Define Hacking?
Hacking is a technical effort to manipulate the normal behaviour of network connections and connected
systems. There are three types of hackers, White hats, Black hats and Grey hats.
26. Distinguish between white hats and black hats?
The computer experts who performs hacking to test the security in computer networks and computer systems are
called white hats.
The computer criminals who break into secure networks to destroy data is called black hats.
27. What is Phishing?
It is a type of identity theft. It is an attempt to acquire user names, passwords credit card details etc.
28. What is the impact of denial of service (DoS) attack on internet?
An attack on the web which will shut down the target server is called DoS attack.
29. Define mobile computing?
Mobile computing is a technology that has computing capability and can transmit or receive data while in mot ion.
30. Write a short note on SIM(Subscriber Identity Module) card?
It is a plastic card contains a computer memory to store and process data.
Three Marks
31. Briefly explain the classification of internet connectivity?
i. Dial-up connectivity: Dial-up connectivity uses the telephone line and a dial-up modem.
Maximum speed of Dial-up connection is 56 Kbps.
ii. Wired broadband connectivity: It uses a broadband modem.Speed is 256 Kbps to 100 Mbps.
iii. Wireless broadband connectivity: Wireless broadband modems are used. Speed is1Gbps.
32. What are the popular wired broadband technologies?
i.ISDN(Integrated Services Digital Network): ii. Cable Internet: iii.DSL(Digital Subscriber Line):
iv. Leased Line: v.FTTH(Fiber to the Home):
33. Briefly explain different wireless broadband technologies?
i.Mobile broadband: It is wireless internet access using mobile devices. It allows to access the internet while traveling.
ii.Wi-Max: Wi-Max modem is needed for this connection. Speed is up to 70 Mbps.
iii. Satellite broadband: It provides internet connectivity through a satellite. Speed is up to 1 Gbps.
34. Briefly explain different internet access sharing methods?
i. Using LAN : Routers can be used for this type of sharing.
ii. Using Wi-Fi Network: The Wi-Fi Modem shares the connectivity to all Wi-Fi enabled devices.
iii. Using Li-Fi (Light Fidelity) Network: Light is used for data transmission. Speed is over 100 Mbps.
35. List the common threats that affect a computer network?
The common threats to a network are Virus, Worm, Trojan Horse, Spams, Hacking, Phishing, Deniel of
Service(DoS) attack. Man in the Middle attacks.
36. Write about the mechanisms used to prevent network attacks?
i.Firewall: Firewall is a system of hardware and soft ware. This prevents the entry of malicious data into the network.
ii.Anti Virus Scanners: These are software that scans computer files for viruses and delete viruses.
iii. Cookies: Cookies are small text files which contains information about our movements in a website.
37. What are the different mobile communication services?
i. Short message Service(SMS): ii.Multimedia Messaging Service (MMS): iii. Global Positioning System(GPS):
38. What is mobile Operating system? Write short note on Android operating system?
These are operating systems used in mobile devices such as smart phones, tablets etc.
Ex:Android OS, Black Berry OS, Windows OS etc.
Android operating system is a Linux based operating system. It is designed mainly for touch screen devices.
Five Marks
39. Explain different services available on internet?
a.World Wide Web(WWW): It is a system of interlinked hypertext documents accessed through internet.
b. Search engines: Used to find information available in the world wide web. ex: google, Bing, Ask. etc.
c. e-mails: e-mail is a method of exchanging digital messages between computers over internet. SMTP
(Simple Mail Transfer) protocol is used for e-mail transmission.
d. Social media: Through social media people can create and share information. Ex: twitter.com, facebook.com.
47. List different parts of e-mail?
i. To: used to give e-mail address of the primary recipient.
ii.Cc: used to give e-mail address of the Secondary recipient.
iii.BCc: used to give e-mail address of the Tertiary recipient.
iv. Subject: Used to give the subject of communication.
v. Content: Used to type messages.