Algorithm To Calculate The Count of Equipment Request Record in Equipment Request Table

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

1.

Algorithm to calculate the count of equipment request record in equipment request table

Step1: Start

Step2: Assign the data type of each parameters

Step3: assign the memory location for each parameters in array

Step4: assign the number of rows and columns

Step5: arrange the details in the table.

Step6: finally display the table.

2. What is the good practice of programming?

Readable

Maintainable

Modular

Efficient

Easy to use

Extendable

Reusable

3. What is an array?

An object that is used to stored a list of values.

Each data stored in an array is address indexable.

4. What is assembler, interpreter, and compiler?

Assembler- translates the high level language to machine level language

Interpreter-It translates and executes the program line by line and checks the syntax and errors in
run time only.

Compiler- compiles the entire program using library files.

5. What is difference between low level and high level programming language?

Low level:

Challenging one

Execution speed is low because the machine language is directly executed.

Modification of programming is difficult


Closely related to hardware.

High level:

Easiest and user friendly language.

Execution speed is high because the high level language is converted into low level language and
then executes.

Modification of program is simple.

Appropriate to write software application and tools.

6. What are the types of project? Explain them.

Development- Step by Step process like Waterfall model

Conversion- Migration of program

Maintenance- Error fixing, changes in the program

7. What are the steps in writing a program? Explain them.

Understanding

Designing

Coding

Compiling

Running

Verifying output

8. What is pseudo code?

Pseudo code is an algorithm expressed in a natural phase it does not present in programming
language.

9. Write the best practice of pseudo code.

Use simple English.

Each instruction is written on a separate line.

It has one entry and one exit in the algorithm.

10. Give one example of pseudo code.

 If student's grade is greater than or equal to 60


Print "passed"
else
Print "failed
11. What is difference between fundamental and user defined data type?

Fundamental data types:

They are called building blocks.

For example: int, float, double

They are also known as primitives.

User defined data types:

The data types are derived or created by the user.

For example: Arrays, record and structures.

12. Explain the three control structures used in writing algorithm.

Sequence-Instructions are executed in the sequence.

Selection-executed the condition given by the programmer

Repetition-Check the program under the condition holds true.

13. Write the guidelines to write good code.

The program should be written by simple like high level language.

Understanding the problem of the program.

Develop the program with simple steps.

14. Count the number of digits in an integer using the while loop.

#include<stdio.h>

int main()

Int number, count=0;

Print f (“Enter a number :”);

Scan f (“%d”, number);

while (number! =0)

{
Count++;

Number /=10;

Print f (“Number of digits =%d\n, count);

Return 0;

You might also like