Showing posts with label C Assignment Answer. Show all posts
Showing posts with label C Assignment Answer. Show all posts
Showing posts with label C Assignment Answer. Show all posts
Showing posts with label C Assignment Answer. Show all posts

## 5. Write an Algorithm to print multiplication of a given range of number.

• Step-1: Start
• Step-2: Input two numbers
• Step-3: Assign 1 to num
• Step-4: Multiply num & lnum, and store c
• Step-5: Print c
• Step-6: Add 1 to num
• Step-7: If num<1, Do step-4
• Step-8: If lnum>hnum, Do step-10
• Step-9: Add num to lnum & Do step-3
• Step-10: Print here is your multiplication table of given range
• Step-11: Stop

Share:

## 4. Discuss briefly the evolution of C language.

C was the originally designed for and implemented on the UNIX operating system on the DEC PDP-II by Dennis Ritchie. C is the result of a development process that started with an older language called BPCL. BPCL was developed by Martin Richards, and influenced by Ken Thompson.

Timeline of C Language.

 Algol C 1960 International Group of Programming CPL 1963 BCPL 1967 Martin Richard B 1970 Ken Thomson (BELL LAB’s) Traditional C 1972 Denis Ritchie K & R C 1978 Brain & Denis Ritchie ANSI C 1989 ANSI Community ANSI\ISO C 1990 ISO Group C 99 1999 ISO Group C 11 2011

Share:

3. Explain Flowchart along with all symbol used in it.

It is a pictorial or graphical representation of the step by step instructions for any solution to mathematical or computational problems.
Or graphical representation of algorithm as known as flowchart,
It depicts the flow of sequence of any specific task.
Flowing different type symbols are used for graphically representing any algorithm.
Flowing different type of symbols are used for graphically representing any algorithm.

Share:

2. Discuss briefly the Algorithm and its used.

It is a set of rules that define a step by step process for solving any problems, either mathematical or computational.
Abdullah Muhammad ibn Musa al-Khwarizmi is a father of Algorithm. He proposed procedural (function) steps for solving any problem.

Uses:-
• algorithm is used in  search engine, Algorithm of data encryption or decryption extra.

• Based on these algorithm computer codes or program are written to accomplish any tasks.

• The complete computer system and its processing the operating system used for it and different application used are based on specific defined algorithms.

• For writing any computer program the first step is to write the algorithm for it.

Q. Write an algorithm for adding two numbers.
• Step-1: Start
• Step-2: input two numbers say a and b
• Step-3: add a and b and show the result in c
• Step-4: Print c
• Step-5: stop

Share:

## What is Procedural Language? How it is efficient from its Pre-processor.

Ans. In the procedural programming the complete program is divided into smaller units of set of instructions, this units are called procedural. Each procedural can be executed separately and may be dependent on the execution of any other procedural in the program.

• In C such a procedure is called function. Each function has a unique name which is used while calling the function.

• Every function has its own memory space in which executes and after completion of execution it may return a value.

• The advantage of having separate procedural for separates sets of instructions it that the maintenance and debugging becomes easier.

[ Notes- C is middle level procedural programming language.]
Ex: -
#include<stdio.h>
#include<canio.h>
Int add (int X, int Y);
{
Return(X+Y);
}
Int subtract (int X, int Y);
{
Return(X-Y);
}
Void main( );
{
Int a, b, c, d ;
Printf(“Enter first number: \n”);
Scanf(“%d”, &a);