Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

1. What is structured programming language?

Ans: Structured programming is a logical programming method that is


considered a precursor to object-oriented programming (OOP). Structured
programming facilitates program understanding and modification and has a
top-down design approach, where a system is divided into compositional
subsystems.

2. Why C is structured programming language?


Ans: C is called a structured programming language because to solve a
large problem, C programming language is divides the problem into smaller
structural blocks each of which handles a particular responsibility. These
structural blocks are-
1. Decision making blocks like if-else-else if, switch-cases
2. Repetitive blocks like For-loop, While-loop, do-while loop etc.
3. Subroutines/procedures-functions.

3. Importance of C Programming Language?

C programming language has following importance’s:

1. C is robust language and has rich set of built-in functions, data types
and operators which can be used to write any complex program.
2. Program written in C are efficient due to availability of several data
types and operators.
3. C has the capabilities of an assembly language (low level features)
with the feature of high level language so it is well suited for writing
both system software and application software.
4. C is highly portable language i.e. code written in one machine can be
moved to other which is very important and powerful feature.
5. C supports low level features like bit level programming and direct
access to memory using pointer which is very useful for managing
resource efficiently.
6. C has high level constructs and it is more user friendly as its syntaxes
approaches to English like language.
4. What is Unstructured programming?

Unstructured programming is a procedural program – the statements are


executed in sequence as written (The statements execute in order you
write)

In this you have to use go to statements that allow the control to pass.
When a go to statement is executed, the sequence continues from the
target of the go to. Thus to understand how a program works, you have to
pretend to execute it. This means that it is often difficult to understand the
logic of such a program

5. Example of structured & unstructured Programming language?

Examples of Structured Programming language are C, C+, C++, and C #,


Java, PERL, Ruby, PHP, ALGOL, Pascal, PL /I and Ada

Examples of unstructured Programming language are JOSS, FOCAL,


MUMPS, TELCOMP, and COBOL.

7. Definition of high-level language?


A high-level language is a programming language designed to simplify
computer programming. It is "high-level" since it is several steps removed
from the actual code run on a computer's processor. High-level source
code contains easy-to-read syntax that is later converted into a low-level
language, which can be recognized and run by a specific CPU.

8. Definition of low-level language?


A low-level language is a programming language that deals with a
computer's hardware components and constraints. It has no (or only a
minute level of) abstraction in reference to a computer and works to
manage a computer's operational semantics.
A low-level language may also be referred to as a computer’s native
language.
9. What is an assembler?
An assembler is a type of computer program that interprets software
programs written in assembly language into machine language, code and
instructions that can be executed by a computer.
An assembler enables software and application developers to access,
operate and manage a computer's hardware architecture and components.
An assembler is sometimes referred to as the compiler of assembly
language. It also provides the services of an interpreter.

10. What is Machine language


Machine language is the basic low-level programming language designed
to be recognized by a computer. Actually the language is written in a binary
code of 0s and 1s that represent electric impulses or off and on electrical
states respectively. A group of such digits is called an instruction and it is
translated into a command that the central processing unit or CPU
understands.

11. What is Interpreter?


Interpreter is a program that executes instructions written in a high-level
language. There are two ways to run programs written in a high-level
language. The most common is to compile the program; the other method
is to pass the program through an interpreter.

12. What is Compiler?


A compiler is a software program that transforms high-level source code
that is written by a developer in a high-level programming language into a
low level object code (binary code) in machine language, which can be
understood by the processor. The process of converting high-level
programming into machine language is known as compilation.
The processor executes object code, which indicates when binary high and
low signals are required in the arithmetic logic unit of the processor.
13. What is keyword?
 Keywords are pre-defined words in a C compiler. Each keyword is
meant to perform a specific function in a C program.
 Since keywords are referred names for compiler, they can’t be used as
variable name.

14. What is comments?


A comment is a special construct in a programming language that allows
the program developer to mention additional information associated with
the program. The main reason for including comments in programming
languages is to improve the portability and maintainability of a code.

15. What is Operator?


An operator is a symbol that tells the compiler to perform specific
mathematical or logical functions. C language is rich in built-in operators
and provides the following types of operators −

 Arithmetic Operators
 Relational Operators
 Logical Operators
 Bitwise Operators
 Assignment Operators
 Increments and Decrement Operators
 Conditional Operators
 Bitwise Operators
 Special Operators

16. What is Operand?


In computer programming, an operand is a term used to describe any
object that is capable of being manipulated. For example, in "1 + 2" the "1"
and "2" are the operands and the plus symbol is the operator.
17.what is loop?
In computer programming, a loop is a sequence of instruction s that is
continually repeated until a certain condition...

18.what is function?
A function is a set of statements that take inputs, do some specific
computation and produces output.
The idea is to put some commonly or repeatedly done task together and
make a function so that instead of writing the same code again and again
for different inputs, we can call the function.

Example:
Below is a simple C/C++ program to demonstrate functions.

19.what is conditional Statement?


Alternatively referred to as a conditional expression and conditional
processing, a conditional statement is a set of rules performed if a certain
condition is met. It is sometimes referred to as an If-Then statement,
because IF a condition is met, THEN an action is performed.

In 'C' programming conditional statements are possible with the help of the
following two constructs:

1. If statement

2. If-else statement

It is also called as branching as a program decides which statement to


execute based on the result of the evaluated condition.

You might also like