Posts

Chapter # 4 Class X

Image
Chapter#4  Control Structure Q#1: What is the purpose of “Default” statements in C++?  Ans: The purpose of the default in the switch case is to provide an option in case the conditions specified to trigger the execution of code within the other options does not occur so that the program will not crash.  Consider this portion of code with switch case statements. switch(expression) {  case “expression1”: /// Code body corresponding to case expression1 case “expression2″: /// Code body corresponding to case expression2  default: //This body is evaluated if none of the case statement are equivalent to the expression.  } Q#2: Can we use while loop in place of for loop? If yes, then how?  Ans: YES. But in most of the cases it’s advisable to use the loops appropriately.  For example, in the below give code, both the loops perform the exact same operation (finding sum of first n numbers) 1. FOR LOOP:  for(i=1 ; i<=n ; ++i)     ...

Chapter # 3 Class IX

 Q#1: What is a word processor? Write any three applications of a word processor.  Ans: A word processor is software or a device that allows users to create, edit, and print documents. It enables us to write text, store it electronically, display it on a screen, modify it and print it to hardcopy. Applications of word processing software:  • Creating, editing, saving and printing documents.  • Formatting text, such as font type, bolding, underlining or italicizing.  • Inserting elements from other software, such as illustrations or photographs.  Q#2: Discuss the Margins and Paper Size options in the Page Setup group.  Ans:  • Margins: A margin is the area or space between the main content of a page and the page edges. This button is used to change the margins of the entire document or selected section.  • Paper Size: The size button is used to choose the size of the paper for current section or entire document.  Q#3: Name and describe tw...

Chapter # 3 class 10

 Q#1: Use \a and \r both escape sequences in a program. Ans: #include <iostream> int main() {  cout<<”COMPUTER\rSCIENCE”; cout<<”COMPUTER\aSCIENCE”; } Q#2: How many types of comments statements are used in C++? Ans: In C/C++ there are two types of comments: 1. Single line comment 2. Multi-line comment Single line Comment Represented as // double forward slash It is used to denote a single line comment. Multi-line comment Represented as /* any_text */ start with forward slash and asterisk (/*) and end with asterisk and forward slash (*/). It is used to denote multi-line comment. Q#3: Difference between arithmetic operator and relational operator. Ans: Arithmetic operators are used to perform mathematical operations like division, multiplication, addition, subtraction and remainder/modulus method. While the relational operators are used to perform comparison operations. Simply we can say, it is used to test the relation between two values. Q#4: Write a program ...

CLI and GUI

Q#1: How an interface plays a vital role in computer? Write about Command Line Interface and Graphical User Interface. Ans: An interface is a program that allows a user to interact with the computer or another computer over a network. 1.       Command Line Interface: A command line interface (CLI) is a screen or text-based representation in which the user types the commands on place called prompt to operate the computer. Commands contain string of characters. CLI is difficult to use because the user has to remember the commands and their syntaxes but it is fast in use because text mode takes less resources. 2.       Graphical User Interface:           A GUI provides a user-friendly environment where user can interact with computer through graphical           objects such as menus, icons, buttons and other graphical objects. It is easy to use as user are    ...

Three functions of Operating System

Q#2: Write any three functions of an operating system.                                          Ans:   1.       Memory Management 2.       File Management 3.       User Management 1.       User Management: In modern operating systems, user management describes the ability of administrators to control user access to various computer resources like software, I/O devices, storage system, networks, etc. 2.       File Management : It manages all the file-related activities such as organization storage, retrieval, naming, sharing, and protection of files. 3.       Memory Management : Memory management module performs the task of allocation and de-allocation of memory space to programs and data in need of these resourc...

Difference Between GUI and CLI

Q#1: Differentiate between CLI and GUI.                                                                        Ans:   CLI and GUI CLI GUI The term CLI is an abbreviation for Command Line Interface. The term GUI is an abbreviation for Graphical User Interface. The CLI is basically a medium or a platform, where a user writes a command to answer a visual prompt and then receives a response from the system/device. The GUI lets users use graphics for interacting with the OS. It is comparatively more difficult to understand and use. It is comparatively easier to understand and use. Higher precision of work can be obtained using CLI. GUI offers a lower level of precision.

Benefits of GUI and CLI

Q#6: Write any two benefits of GUI and CLI.  Ans: Command line interface:             Advantages:           a. A CLI requires less memory to operate the commands.            b. A CLI doesn’t require high-resolution monitor.            Graphical User Interface:            Advantages:            a. GUI looks very attractive and multi-colored.            b. User can switch quickly between tasks on the GUI interface.