Search This Blog

Thursday 8 September 2022

Four letters words From X, Y & Z - Scrabble Game Valid Vocabulary From All Dictionaries

GO TO INDEX
Scrabble Game Valid Words From All Dictionaries
'4' letters words From X, Y & Z

Four Letters Words

Note: Words in red are not valid in some Scrabble Game Applications
X
XrayXyst

Y
YaarYeggYogh
YabaYeldYogi
YackYelkYoke
YadsYellYoks
YaffYelmYold
YageYelpYolk
YagiYeltYomp
YagsYensYond
YahsYeowYoni
YaksYepsYont
YaldYerdYoof
YaleYerkYoop
YamsYeskYore
YangYestYork
YankYetiYorp
YappYettYouk
YapsYeukYour
YardYeveYous
YareYewsYowe
YarkYgoeYowl
YarnYidsYows
YarrYikeYuan
YateYillYuca
YaudYinsYuch
YaupYipeYuck
YawlYipsYuft
YawnYirdYuga
YawpYirkYugs
YawsYirrYuke
YawyYiteYuko
YaysYlemYuks
YbetYlkeYuky
YeadYmpeYule
YeahYmptYump
YeanYobsYunx
YearYockYups
YeasYodeYurt
YeboYodhYutz
YechYodsYuzu
YedeYogaYwis
Yeed--

Z
ZackZestZoea
ZagsZetaZoic
ZanyZezeZoil
ZapsZhosZols
ZarfZiffZona
ZariZigsZone
ZatiZilaZonk
ZealZillZoom
ZeasZimbZoon
ZebuZincZoos
ZedaZineZoot
ZedsZingZori
ZeesZinsZouk
ZeinZipsZulu
ZeksZiteZupa
ZelsZitiZure
ZensZitsZurf
ZepsZizzZyga
ZerkZoboZyme
ZeroZobuZzzs



Wednesday 7 September 2022

Sabaq No.24: Ya' Rab! Chaman Nazam Ko Gulzar-e-Erum kar (Marsiya - Nazam) - درسی کتاب کی مشق - Gulzaar E Urdu - Compulsory (NEW BOOK - 2022 and onward) - Class XI (1st year) For All Groups

GO TO INDEX
سبق نمبر 24: یارب! چمن نظم کو گل زار ارم کر (مرثیہ - نظم)
درسی کتاب کی مشق


By Farabi Publishers Guide Book



سوال نمبر 6: مرثیہ کی تعریف کیجیۓ۔
جواب: مرثیہ:



Tuesday 6 September 2022

UNIT 02. BASICS OF PROGRAMMING IN C++ - Question And Answers - Computer Science For Class X

GO TO INDEX

Computer Science For Class X
Unit 02: Basics Of Programming In C++
Question And Answers


Q.1: Define Computer Program?
Ans: COMPUTER PROGRAM:
A computer program is a set of instructions that performs a specific task when executed by a computer. A computer requires programs to function and typically executes the program's instructions in a central processing unit. A computer program is usually written by a computer programmer in a programming language.

Q.2: Define syntax OR What is syntax in programming?
Ans: SYNTAX IN PROGRAMMING LANGUAGE:
Syntax refers to the rules that define the structure of a language. Syntax in computer programming means a set of keywords and characters that a computer can understand, interpret and perform task associated with them. The syntax of a language must be followed, and if it is not followed, the code will not be understood by a compiler or interpreter. Different programming languages have different types of syntax.

Q.3: Describe classification of programming language.
Ans: CLASSIFICATION OF PROGRAMMING LANGUAGE:
Based on the accessibility of hardware, programming languages can be classified into the following categories:
  1. Low-level language
  2. Middle-level language
  3. High level language

Q.4: Define low level language.
Ans: LOW-LEVEL LANGUAGE:
Low-level programming languages are those languages that are directly communicated with computer hardware. The two languages come under this category are Machine language and Assembly language.

Q.5: Define machine language.
Ans: MACHINE-LEVEL LANGUAGE:
Machine language is a collection of binary digits or bits that the computer reads and interprets. This language is the only language understood by computers while machine language is almost impossible for humans to use because they consist entirely of numbers (0s & 1s). Machine code doesn't require translator because machine code is directly executed by computer. It is also called first generation language.

Q.6: Define assembly language.
Ans: ASSEMBLY LANGUAGE:
A program written in assembly language consists of a series of instructions called mnemonics that correspond to a stream of executable instructions. Assembly language code is translated by a translator called assembler. Assembly language uses keywords and symbols much like English and are easy to read, write and maintain as compared to machine language. It is also called second generation programming language.


Q.7: Define middle level language.
Ans: MIDDLE-LEVEL LANGUAGE:
The middle-level language lies in between the low level and high-level language. Middle-level language actually binds the gap between a machine level language and high-level languages, these languages are now become obsolete and are not in used.

Q.8: What do you know about high level language?
Ans: HIGH-LEVEL LANGUAGE:
High-level languages are relatively new and drastically revolutionized the programming world. It allows us to write computer code using instructions resembling everyday spoken language, usually English (for example: print, if, while). Programs written in a high-level language need to be translated by a translator (compiler or interpreter) into machine language before execution.

Q.9: write down the advantages or benefits of high-level language.
Ans: ADVANTAGES OF HIGH-LEVEL LANGUAGE:
  • High level language is much closer to human language so it is more suitable to write code in high level language.
  • It is more or less independent or portable of the particular type of computer used.
  • It is easier to read, write and maintain.

Q.10: Write down the differences between low-level and high-level languages.
Ans: DIFFERENCES BETWEEN LOW-LEVEL LANGUAGE AND HIGH-LEVEL LANGUAGE:
Low Level Language High Level Language
 In low level language machine codes (0 and 1) are used as an instruction to the computer. In high level language English like words are used as an instruction to the computer.
 The execution of programs is quite fast. The execution of programs is not very fast.
 Instructions are directly understood by the CPU.  Instruction are not directly understood by the CPU.
 No need to translate program. In case of assembly language assembler is required. Translation of program is required.
 The programs written in low level languages are machine dependent and are difficult to modify. The programs written in high level languages are machine independent and are easy to modify.
 The examples of low-level languages are:
  1. Machine language
  2. Assembly language
 The examples of high-level languages are: BASIC, FORTRAN, COBOL, PASCAL, C languages etc.


Q.11: Define translators or language translators.
Ans: TRANSLATORS OR LANGUAGE TRANSLATORS:
Language translator is a computer program that converts high level language program into low level program (1s & 0s), or machine language. It transforms the source code into the object code (machine code) which understands directly by the computer processor. Translators also detect and report errors in the process of translation. There are three types of language translators.
  • Interpreter
  • Compiler
  • Assembler


Q.12: What is compiler?
Ans: COMPILER:
Compiler is a program bat translates the high, level language program into machine language. Complier translates the whole Program at a time at once before it executed and makes a separate object file for the translated program. Translated program can he used multiple time without the need of retranslation of source code. Each high-level language has its own compiler.


Q.13: Define Interpreter?
Ans: INTERPRETER:
Interpreter is a language translator program, which converts high level program into machine language. It translates one instruction at a time. Interpreter does non make any object file and it translates the program every time when executed. An interpreter is faster than a compiler as It immediately executes the codes.


Q.14: Define Assembler.
Ans: ASSEMBLER:
An assembler is a translator that converts assembly language program iNto machine language. An assembler translates assembly language code directly Into machine code that can he understood by the CPU.


Q.15: Define source program or source code?
Ans: SOURCE PROGRAM /SOURCE CODE:
A Program or A program written by a programmer in any language other than machine language is called a source program or source code.

Q.16: Define object.
Ans: OBJECT PROGRAM /OBJECT CODE:
Object program is a program or code that is converted into machine language. (OR) The output from a language translator, which consists of machine language instructions, is called the object program.

Q.17: Write down the differences between interpreter and compiler?
Ans: DIFFERENCES BETWEEN INTERPRETER AND COMPILER:
Compiler Interpreter
 Interpreter translates high level language program into machine language line by line. Compiler translates high level language program into machine language as a whole.
 The interpreter translates the program every time when executed. The compiler translates the program once at a time.
 The interpreter does not make any object file. The compiler makes a separate object file for the translated program.
 Errors are displayed for every instruction interpreted if any. Errors are displayed after entire program is checked.
 Examples: BASIC, LISP etc.  Examples: C Compiler, C++ compiler etc.

Q.18: Define errors or programming errors.
Ans: ERROR:
An error describes any issue that arises unexpectedly that causes a program to not function properly. In general, there are three types of errors that occur in a computer program. Syntax Error, logical Error and Runtime Error.

Q.19: What Is syntax error?
Ans: SYNTAX ERROR:
A syntax error is an error in the syntax due to violation of rules of whatever language program is being written. These are sometimes caused by simple typing mistakes.

Q.20: What is logic error?
Ans: LOGIC ERROR:
In computer programming, a logic error is a bug or error in planning the program's logic. They do not cause the program to crash or simply not work at all, they cause it to 'misbehave' in some way, rendering wrong output of some kind. The computer does not tell us, what is wrong.

Q.21: What is runtime error?
Ans: RUNTIME ERROR:
A runtime error is a program error that occurs when a program is run on the computer and the result are not achieved due to some misinterpretation of a particular instruction. The code doesn't have any syntax or logic error but when it executes it cannot perform specific task.

Q.22: What is Programming Environment of C++?
Ans: PROGRAMMING ENVIRONMENT OF C++:
Programming environment is an environment which supports execution of programming language smoothly and efficiently on a local computer to compile and run programs.

Q.23: Define IDE or Integrated development environment?
Ans: INTEGRATED DEVELOPMENT ENVIRONMENT (IDE):
An integrated development environment (IDE) is software for building applications or programs that combines common developer tools into a single graphical user interface (GUI). IDE facilitates the development of applications designed to encompass all programming tasks in one application, one of the main benefits of an IDE is that they offer a central interface with all the tools, a developer needs. Dev-C++, is used for writing programs in C++ language, however there are many multiple language IDEs.

Q.24: Write down the benefits or advantages of integrated development environment.
Ans: BENEFITS / ADVANTAGES OF INTEGRATED DEVELOPMENT ENVIRONMENT:
IDE combines all tools that need for development. Programmers don't need to switch between different tools to design a layout, write the code, debug, build,etc.
Many IDEs incorporate basic spelling checkers, so automatically check for errors to improve code.
Libraries provide for functions in IDEs that are not included in the core part of the programming language.

Q.25: What are the components of Integrated Development Environment?
Ans: COMPONENTS OF INTEGRATED DEVELOPMENT ENVIRONMENT (IDE):
IDEs combining common tools that are necessary for a programmer to develop program, these are:
EDITING SOURCE CODE:
Writing and editing source codes is a major part of programming. A text editor is used for writing and editing source codes with feature providing language specific autocompletion, and checking for bugs as code is being written.

SYNTAX HIGHLIGHTING:
Syntax highlighting is a feature of IDEs that provides visual cues, keywords, and other words that have special meaning in languages are highlighted. This feature makes code easier to read or understand.

CODE COMPLETION:
It is a feature of IDE that completely knows the language syntax that speeds up process of coding by reducing typos and other mistakes. Autocompletion popups while typing, querying parameters of functions, query hints related to syntax errors.

COMPILER:
Compiler is a component of IDEs that translate source code into machine code. IDEs provide automated build process. This feature can help automate developer tasks that are more common to save time.

LINKER:
Linker connects or links referenced library files with compiled code. It saved the linked objects into an executable file.

LOADER:
This is the operating system's program that loads executable files into memory and directs the CPU to start running the program as directed by the IDE.

DEBUGGING:
The process of removing errors from a program is known as debugging. Debugging is a multistep process that involves identifying a problem, isolating the source of the problem. The final step of debugging is to test the correction or workaround and make sure it works.

Q.26: Define Linker, Loader and Debugging?
Ans: LINKER:
Linker connects or links referenced library files with compiled code. It saved the linked objects into an executable file.

LOADER:
This is the operating system's program that loads executable files into memory and directs the CPU to start running the program as directed by the IDE.

DEBUGGING:
The process of removing errors from a program is known as debugging. Debugging is a multistep process that involves identifying a problem, isolating the source of the problem. The final step of debugging is to test the correction or workaround and make sure it works.

Q.27: What do you know about Dev C++?
Ans: INTRODUCTION TO DEV-C++:
Dev-C++ is a fully featured graphical IDE (Integrated Development Environment) for programming in C / C++. DEV-C++ is developed by Bloodshed software. It was originally developed by Colin Laplace and first released in 1998. It is written in Delphi. With Dev C++ programmer can write Windows or console-based C/C++ programs easily.

Q.28: Write down the installation procedure of Dev C++:
Ans: INSTALLING AND CONFIGURING DEV-C++ IDE:
Dev-C++ is free available for download on Internet. After downloading the package begin the installation process. Following are the steps for installing Dec-C++ IDE.

STEP 1:
  • Select "English" as the language to be used for installation process.


STEP 2:
  • Press " I Agree" button to agree the license agreement.


STEP 3:
  • Select "Full" from the drop-down menu "for type of Install". This will select all the necessary components required to run Dev-C++ and compile C++ source code.
  • Click on "Next" to proceed.


STEP 4:
  • Select the installation folder (directory) where all the necessary Dev-C++ files and libraries will be installed. Usually, the default specified path is used for installation but we can change it if desired.
  • Click on "Install" to start installation.




STEP 5:
  • After completing process, it will show a "Finish" dialog box.
  • Make sure the "Run Dev-C++ 5..." is checked.
  • Click 'Finish' button. This will automatically start Dev-C++ after installation completes.


CONFIGURING DEV-C++:
  • Dev-C++ will require some configuration when it runs first time.
  • Set "English (Original)". as default interface language in the Dev-C++ first time configuration dialogue.
  • Click "Next" to continue.
  • On the "Theme" selection dialog box leave the default setting and click on "Next" to continue.
  • Click "OK' to close first time configuration dialogue.



LINKER SETTING FOR DEBUGGING:
Linker setting for bugging is required first time to obtain information about problems in source code. The following steps are used to enable this configuration.
  • Click on ToolsCompiler Options.
  • Open the Setting tab from the Compiler Options dialogue box.
  • Under Setting tab, open Linker tab.
  • In Linker tab change the Generate Debugging Information (-g3) options to Yes.
  • Click on OK to save setting.



Q.29: Write down the procedure to develop a program in Dev C++.
Ans: DEVELOPING PROGRAM IN DEV-C++:
Development of C++ program requires writing source and saving those files for compilation. The steps to create a new project in Dev-C++ are:
  • Click on File ⇨ click NewProject.
  • In New Project dialog, Select Empty Project.
  • From language option, select C++ Project. Also enter Name for project.
  • Click on OK.
  • Dev C++ will ask path to save the new project, enter path and save project.



ADD NEW FILES TO PROJECT IN DEV-C++:
The step to create a new file are:
  • Click on Project ⇨ New File. Alternatively we can also right-click on the Project Name in the Project Explorer and click on the New File.
  • Click on Yes on the confirm dialog box to add a file.
  • To save newly added file, click on File ⇨ Save
  • Enter the path and provide its name.
  • Click on Save to Store the file.


COMPILE AND EXECUTE PROJECT IN DEV-C++:
The steps to compile and execute project are:
  • Project needs to compile before execution. To compile, click on Execute ⇨ Compile or press F9 key. Compiler Log tab shows the compilation status. Compiler tab will show if there are any syntax errors.
  • After successfully compiling the project, run it by clicking on Execute ⇨ Run or by pressing F10 key.
  • A console window will open and show the output of the program.

Q.30: What do you know about C++ programming language?
Ans: C++ PROGRAMMING LANGUAGE:
C++ is a powerful general-purpose programming language. It was created lay Bjarne Stroustrup in 1979 at Bell Laboratories. It is used to develop operating systems, browsers, games, and other applications. C++ mainly supports programming like object oriented. C++ is a flexible language aims to make writing programs easier and more pleasant for the individual programming.

Q.31: Define reserved words in C++.
Ans: RESERVED WORDS IN C++:
Reserved words are keywords that have standard predefined meanings in C++ language. These keywords can only be used for their intended purpose; they cannot be used as programmer defined identifiers.
The following list the keywords or reserved words of the C++ language:

 and new
 asm nullptr
 auto Operator
 bool Or
 break private
 case protected
 catch public
 char register
 class reinterpret_cast
 const requires
 const_cast return
 continue short
 default  signed
 delete sizeof
 do static
 double static_cast
 dynamic_cast struct
 else switch
 enum template
 explicit this
 export Throw
 extern true
 false try
 float typedef
 for typeid
 friend typename
 goto union
 if unsigned
 inline Using
 int virtual
 long void
 mutable volatile
 namespace wchar_t
 not while

Q.32: Define data types in C++.
Ans: C++ DATA TYPES:
Data values passed in a program may be of different types. Each of these data types are represented differently within the computer's memory and have different memory requirements. These data types can be augmented by the use of data type qualifiers / modifiers.
The data types supported in C++ are described below:


Q.33: What ls constant? Also define its types.
Ans. CONSTANT:
A constant is an identifier whose value remains unchanged through out the program.
OR
Constants and Variables A constant is a data item whose value cannot change during the program's execution. Thus, as its name implies - the value is constant.
OR
A constant is a value that cannot be altered by the program during execution, i.e., the value is constant. When associated with an identifier, a constant is said to be "named," although the terms "constant" and "named constant" are often used interchangeably.


TYPES OF CONSTANT:
Constants are used in two ways. They are:
  1. Literal Constants
  2. Defined Constants

Q.34: Define literal constant.
Ans: LITERAL CONSTANT:
Literal constants are data used for representing fixed values. 'They can be used directly in the codes.
Example:
  • 1, 2, 5, "c", "good" etc.

Q.35: Define symbolic constant.
Ans: DEFINED OR SYMBOLIC CONSTANT:
In C++, we can create symbolic constant whose value remains unchanged but used as a variable. A symbolic constant can be created using the #define preprocessor directive or const keyword.
Example:
  • const int LIGHT_SPEED = 299792458;
  • #define LIGHT SPEED 29972458

Q.36: Define variable and rules for naming variables.
Ans: VARIABLE:
A variable is nothing but a name given to a storage area that our programs can manipulate. Its value can change during program execution. Each variable C++ has a specified data type, which determine the size and layout of the variable's memory.

RULES FOR NAMING VARIABLE:
The general rules for constructing names for variables (unique identifiers) are:
  • A variable name contains alphabets (letters), number, and underscores.
  • A variable name must start with a letter or an underscore (_).
  • Variable names are case sensitive. (myVar and myvar or Sum end sum are different variables)
  • Variable names cannot contain whitespaces or special characters like !, #, % etc.
  • Reserved words (Like C++ keyword, such as int cannot be used as names.
  • A variable name cannot be longer than 32 characters in C++ by default.

Q.37: Define Declaring (Creating) and initializing Variables.
Ans: DECLARATION (CREATING) VARIABLE:
Variable declaration is a process in which we create storage space for variable in memory. A variable declaration consists of data type and name of the variable written as follow:
  • data_type variable_name,
  • int sum

INITIALIZATION:
Assign initial value to a variable is known as variable initialization. It can be initialized during declaration or separately. The equal sign is used to assign value written as follows:
  • data_type variable_name value;
  • int sum = 3;

Q.38: Define strings in C++.
Ans: STRINGS IN C ++:
Variables that can store alphanumeric value that consist of multiple characters are called strings. In C++, strings are used by one-dimensional array of characters, which is terminated by a null character \0.






Sunday 4 September 2022

Saturday 3 September 2022

Sabaq No.22: Rahay Naam Allah Ka (Nazam) - درسی کتاب کی مشق - Gulzaar E Urdu - Compulsory (NEW BOOK - 2022 and onward) - Class XI (1st year) For All Groups

GO TO INDEX
سبق نمبر 22: رہے نام اللہ کا (نظم)
(ماخوذ از: کلیات نظیر)
درسی کتاب کی مشق


By Farabi Publishers Guide Book



سوال نمبر 6: "مسدس" کی تعریف کیجیۓ۔
جواب: مسدس:



Sabaq No.22: Rahay Naam Allah Ka (Nazam) - بند کی تشریحات - Gulzaar E Urdu - Compulsory (NEW BOOK - 2022 and onward) - Class XI (1st year) For All Groups

GO TO INDEX
سبق نمبر 22: رہے نام اللہ کا (نظم)
(ماخوذ از: کلیات نظیر)
بند کی تشریحات


By Farabi Publishers Guide Book




Wednesday 31 August 2022

UNIT 01: PROBLEM SOLVING AND ALGORTHM DESIGNING - Question Answers - Computer Science For Class X

GO TO INDEX

Computer Science For Class X
Unit 01: Problem Solving And Algorithm Designing
Question Answers



Q.1: What is problem solving?
Ans: PROBLEM SOLVING:
Problem solving is a procedure to figure out the solution of complex problems. Problem solving is the main process in computer programming, where programmers first understand the problem, plan the solution and then understand how to translate algorithm into something a computer can do, and finally how to write the specific syntax or code required by a computer to get the job done.

Q.2: Define Problem?
Ans. PROBLEM:
Problem sometimes referred as an issue, is any situation that occurs and is unexpected or prevents something from occurring. In programming a problem is considered as a matter which is difficult to solve, it is a complex task or routine.

Q.3: What are the strategies of problem solving?
Ans: PROBLEM SOLVING PROCESS:
Finding a suitable solution for issues can be accomplished by a step-by-step process. Following are the basic four steps for the problem solving process.
  1. Define the problem.
  2. Generate alternative solutions.
  3. Evaluate and select an alternative.
  4. Implement and follow up on the solution.


1. DEFINE THE PROBLEM:
Specifically, the task of defining the problem consists of identifying what you know (input-given data), and what you want to obtain (output-the result). During this step, It is more important to understand described problem.

2. GENERATE ALTERNATIVE SOLUTIONS:
Many alternative solutions to the problem should be generated to achieve the desired results. Generating multiple alternatives can enhance the value of best solution. So, it is good to generate a list of all possible solutions and evaluate to decide which one is the best for that particular problem.

3. EVALUATE AND SELECT AN ALTERNATIVE:
Good problem-solving approach uses a series of considerations when selecting the best alternative. In this step, evaluate all possible solutions related to a target standard and select the best alternative. A particular alternative will solve the problem without causing other unanticipated problems.

4. IMPLEMENT AND FOLLOWUP ON THE SOLUTION:
The implementation of best solution also includes planning on what happens when something goes wrong with the selected solution. It is also important to follow up and track the results of solution at every stage of implementation.

Q.4: What is algorithm?
Ans. ALGORITHM:
An algorithm is a procedure or formula for solving a problem. It can be defined as the set of well-defined step by step instructions to solve a program. In computer science an algorithm usually means a small procedure that solves a specific problem designs; algorithms are widely used throughout all areas of IT. There are two common methods to represent algorithm designs; pseudocode and flowcharts.

Q.5: Explain the role of algorithm In problem solving. OR Describe the advantages of algorithm.
Ans. ROLE OF A GOOD ALGORITHM IN PROBLEM SOLVING:
Algorithms give us the most ideal option of accomplishing a task in problem solving. Algorithms are used to find the best possible way of solving a problem. In doing so they improve the efficiency of a program. With the best algorithm, a computer program will be able to produce very accurate results. An algorithm can be used to improve the speed at which a program executes.

Q.6: What are the qualities of a good algorithm?
Ans. QUALITIES OF A GOOD ALGORITHM:
Inputs and outputs should be defined exactly.
Every step in an algorithm must be clear, precise and unambiguous.
It should be effective among many different ways to solve a problem.
It shouldn't have computer code. Instead, the algorithm must be written in such a way that, it can be used in similar programming languages.

Q.7: Write some examples of algorithm.
Ans. ALGORITHM EXAMPLES:

ALGORITHM 1. MAKING A CUP OF TEA
  • Step 1: Start.
  • Step 2: Put the teabag in a cup.
  • Step 3: Fill the kettle with water.
  • Step 4: Boil the water in the kettle.
  • Step 5: Pour some of the boiled water into the cup.
  • Step 6: Add milk to the cup.
  • Step 7: Add sugar to the cup.
  • Step 8: Stir the tea.
  • Step 9: Drink the tea.
  • Step 10: Stop

ALGORITHM 2. SUBTRACTION OF TWO NUMBERS
  • Step 1: Start
  • Step 2: Declare variables nl, n2 & sub
  • Step 3: Read values n1 & n2
  • Step 4: Subtract n1 & n2 and assign the result to sub
    sub = n1- n2
  • Step 5: Display sub
  • Step 6: Stop

ALGORITHM 3. ADDITION OF TWO NUMBERS
  • Step 1: Start
  • Step 2: Declare variables nl, n2 & sum
  • Step 3: Read values n1 & n2
  • Step 4: Add n1 & n2 and assign the result to sum
    sum = n1+ n2
  • Step 5: Display sum
  • Step 6: Stop

ALGORITHM 4. MULTIPLICATION OF TWO NUMBERS
  • Step 1: Start
  • Step 2: Declare variables nl, n2 & mul
  • Step 3: Read values n1 & n2
  • Step 4: Multiply n1 & n2 and assign the result to mul
    mul = n1 * n2
  • Step 5: Display mul
  • Step 6: Stop

ALGORITHM 5. AREA OF CIRCLE
  • Step 1: Start
  • Step 2: Declare variable r and area
  • Step 3: Read value of r
  • Step 4: Apply formula {Area = (3.142) * r * r}
    area = (3.142) * r * r
  • Step 5: Display area
  • Step 6: Stop

Q.8: What is flowchart?
Ans: FLOWCHART:
A flowchart is a pictorial representation of an algorithm, workflow or process, showing the steps as boxes of various kinds, and their order by connecting them with arrows. It is used to show the sequence of steps and logic of solution to a given problem. Flowcharts are used in analyzing, designing, documenting or managing a process or program in various fields.

Q.9: Define different symbols used in flowchart.
Ans. FLOWCHART SYMBOLS:
1. TERMINAL OR START/ STOP:
The terminal symbol is used to indicate the beginning (START) and ending (STOP) in the program logic flow.

2. PROCESS:
Process symbol is used to illustrate a process, action or an operation. These are represented by rectangles.

3. INPUT/OUTPUT:
The input / output symbol is used to denote any type of input data or output information.


4. DECISION:
The decision symbol is used in a flowchart to indicate a point at which a decision has to be made and a branch to one of two or more alternative points are possible.


5. ARROWS OR FLOWLINES:
Flowlines with arrowheads are used to indicate the flow of operation. It shows the exact sequence in which the instructions are to be executed.


Q.10: Write down the importance of flowchart in problem solving.
Ans. IMPORTANCE OF FLOWCHART IN SOLVING A PROBLEM:
1. Communication:
Flowcharts are better way of communicating the logic of a system.

2. Effective Analysis:
With the help of flowchart, problem can be analyzed in more effective way therefore reducing cost and wastage of time.

3. Efficient Coding:
The flowcharts act as a guide or blueprint during the systems analysis and program development phase.

4. Proper Debugging:
The flowchart helps in debugging a process.

5. Efficient Program Maintenance:
The maintenance of operating program becomes easy with the help of flowchart. It helps the programmer to put efforts more efficiently on that part.

Q.11: Write down the example of flowchart.
Ans. FLOWCHART EXAMPLE:

Sum Of Two Numbers



Q.12: What are the differences between algorithm and flowchart?
Ans. DIFFERENCE BETWEEN ALGORITHM & FLOWCHART:
S.NO. ALGORITHM FLOWCHART
1. It is step by step solution of program.  It is the diagrammatical representation which shows the flow of data.
2. Text in common language is used in algorithm. Symbols and shapes are used in flowchart.
3. It is difficult to write and understand. It is easy to construct and understand.
4. Algorithm doesn't have any specific rules.  Flowchart have specific rules for its construction.

Q.13: Define data structures.
Ans. DATA STRUCTURES:
Data structure is a particular means of organizing and storing data in computers in such a way that we can perform operations on the stored data more efficiently. Data structures have a wide and diverse scope of usage across the fields of Computer Science and Software engineering. Data structure may be linear or non-linear.

Q.14: Describe linear data structure.
Ans: LINEAR DATA STRUCTURE:
Linear data structure arranges the data in a linear fashion. The data elements are arranged sequentially such that the element is directly linked to its previous and he next elements. This data structure supports single-level storage of data. And hence, transfer of the data is achieved through a single run only.
Examples of linear data structures are Stack, Queue, Array, etc.

Q.15: Define stack and its operations.
Ans. STACK:
Stack is a linear data structure that stores information in such a way that the last item stored is the first item retrieved. It is based on the principle of LIFO (Last-in-first-out). The stack in digital computers is a group of memory locations with a register that holds the address of top of element. Stacks usually performs two operations.
  • Push: It is used to insert an element on top of stack.
  • Pop: It is used to delete an element from top of stack.

Q.16: Define queue data structure and its operations.
Ans. QUEUE:
Queue is the type of linear data structure where the elements to be stored follow the rule of First in First Out (FIFO). In queue, the element that was added first is removed first. In this data structure, both ends are used for the insertion and the removal of data. The two main operations of queue are enqueue and dequeue.
  • Enqueue: It refers to the process where inserting an element is allowed to the collection of data.
  • Dequeue: It refers to the process where removal of elements is allowed, which is the first element of queue.

Q.17: Define array data structure and its operations.
Ans. ARRAY:
The array is the type of linear data structure that stores homogeneous (same type) elements at memory locations which are consecutive. The same types of objects are stored sequentially in an array. The main idea of an array is that multiple data of the same type can be stored together. Before storing the data in an array, the size of the array has to be defined. The location of elements stored in an array has a numerical value called index to identify the element. Some operations of array are:
  • Traverse: Go through the elements and print them.
  • Search: Search for an element in the array by its value or its index.
  • Update: Update the value of an existing element at a given index.
  • Insert: Insert an element in array.
  • Deletion: Delete an element from array.
  • Sorting: Rearrange a given array or list of elements.


Q.18: Describe nonlinear data structure.
Ans. NON-LINEAR DATA STRUCTURES:
Non-linear data structures are those data structures in which data items are not arranged in a sequence. In this structure, each element can have multiple paths to connect to other elements. Non-linear data structures allow multi-level storage. Non-linear data structures are not easy to implement but are more efficient in utilizing computer memory.
Examples of non-linear data structures are Tree, Graphs, etc.

Q.19: Define tree data structure.
Ans. TREE:
A tree can be defined as a finite set of data items (nodes) in which data items are arranged in branches and sub-branches. It consists of various linked nodes and has a hierarchical tree structure that forms a parent-child relationship. In tree structure, the first node is called root node. The node connected to root node are called parent node and another node connected to parent node is called child node. Various types of trees have been developed throughout the past decades, one of them are binary tree or binary search tree.


Q.20: Define graph data structure.
Ans. GRAPH:
Graphs are used to solve many real-life problems. A graph is a non-linear data structure that has a finite number of vertices and edges, and these edges are used to connect the vertices. The vertices are used to store the data elements, while the edges represent the relationship between the vertices. The order of a graph is the number of vertices in the graph. The size of a graph is the number of edges in the graph. Two nodes are said to be adjacent if they are connected to each other by the same edge.
There are two types of graphs:
  • Undirected graph
  • Directed graph


Q.21: Define undirected graph.
Ans. UNDIRECTED GRAPH:
An undirected graph is a graph in which all its edges have no direction. It can go in both ways between the two vertices.

Q.22: Define directed graph.
Ans. DIRECTED GRAPH:
A directed graph is a graph in which all its edges have a direction indicating what is the start vertex and what is the end vertex.




Sabaq No.21: Naat (Nazam) - درسی کتاب کی مشق - Gulzaar E Urdu - Compulsory (NEW BOOK - 2022 and onward) - Class XI (1st year) For All Groups

GO TO INDEX
سبق نمبر 21: نعت (حصہ نظم)
(ماخوذ از: ماحصل پروفیسر اقبال عظیم کا مکمل سرمایہ شاعری)
درسی کتاب کی مشق


By Farabi Publishers Guide Book