0% found this document useful (0 votes)
33 views6 pages

English - 6 PDF

Uploaded by

mcno00000000
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views6 pages

English - 6 PDF

Uploaded by

mcno00000000
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Chapter # 8 Important Short Questions

1) Define Programming Language?


A set of words and symbols that are used to write programs is called programming language.
Programming languages are used to write computer programs. Examples of programming languages are
C, Java etc.
2) Who is programmer?
A person who develops a computer program is called programmer. The programmer develops programs
to instruct the computer how to process data and convert it in to information. Programmers use
programming languages to develop computer programs.
3) What do you mean by case sensitive language?
Case sensitivity means upper case and lower case alphabets. C is a case sensitive language it can
differentiate upper and lower case words.
4) State the purpose of defining preprocessor directive.
Preprocessor directives are the first line of the C Program. Define directives is used to declare constant
that remains same during execution of the program.
5) Distinguish between low level and high level languages.
Low Level High Level
Low level language is difficult. Low level languages High level language is easy. High level languages
provide more hardware support. The programs provide less hardware support. Program execution
written in low level language are faster in is slow in high level languages.
execution.
6) Define preprocessor directive?
Preprocessor directives are instructions for C preprocessor. These instructions are written at the
beginning of the program. Every preprocessor directive start with # symbol and define or include
directives.
7) Define Linking.
Linking is the process in which the object file produced by the compiler is linked to many other library
files. The library files must be linked with the object file before execution of the program.
8) Define Header File.
Header files contain the declaration or information of standard library functions. These functions are
called in the main body of the program to perform different tasks. The extension of header files is .h .
9) What do you mean by delimiters.
The curly braces { } in a program are called delimiters. The statements of the programs are written in these braces.
10) How source code is different from object code?
Object Code Source Code
The computer program in machine like language or in a A program written in a high level language is called
low level language is called object program or object source code. It is also called source program. It cannot be
code. This code is easily understandable by the executed by computer directly without converting it in
computer. machine code.
11) List any four commonly used high level languages.
C, C++, Java, Pascal, Visual Basic, Python, Cobol.
12) What is meant by compiling a program?
Computer does not understand C Language. It understands only machine language. So C language code is converted
into machine language. The process of converting source code in to machine code is called compiling. After compiling
source program is converted in object program and saved on disk with extension .obj . Alt + F9 key used to compile.
13) What is mean by executing a program?
The process of running an executable file is called executing. After linking C program can be executed. Program loader
is used to transfer executable file from hard disk to main memory. The program can by run from Run Menu or by
pressing CTL +F9.
14) What is meant by machine independence?
A low level language program can run only on the type of computer for which it is written. So low level languages are
machine dependent. A program written in high level language is machine independent because it can run on all types
of computers.
Important Long Questions Chapter 2
1. Briefly describe the basic structure of C program with example.
2. How would you create, edit and execute a C program. Explain in detail with diagram.
3. What is an error? Explain different types of Errors in C-Language.
4. What is language processor? Describe different types of language processors.
Chapter # 09 Important Short Questions
1) What is Identifier?
In a program the names that are used to represent variables, constants, types , functions and labels are
called identifiers. There are two types of identifiers.
(1) Standard Identifier (2) User Defined Identifier
2) What is standard identifier?
Identifiers that have special meaning in C language are called standard identifiers. These identifiers can be
redefined but not recommended. Examples is printf() and scanf();
3) What is user defined identifier?
Names assigned by the programmer to functions, data types and variables are user defined identifiers.
Example: - age, Roll#
4) What are Keywords in C?
Keywords are also called reserve words in C. These have predefined meaning in C language. These can not
be used as identifiers. All keywords are written in lower case. C had total 32 keywords. Example: if, else.
5) What is variable?
The named memory location used to store input data and result, during the execution of the program is
called variable. Variables are created in main memory (RAM), therefore they cannot permanently store
data.
6) What is the difference between variable declaration and variable definition?
Variable Declaration: - Variable declaration specifies the name and data type of variable to compiler. It
does not allocate memory to the variable. Syntax : - data type Variable _ name, int a;
Variable Definition: - Variable definition not only specifies the name and data type of variable to compiler
but also allocates allocate memory to the variable. Syntax : - data type Variable _ name= value;
7) What is variable initialization?
Assigning a value to a variable at the time of declaration is called variable initialization. Example: int a=10;
8) Define Constant.
The quantity whose value cannot be changed during execution of program is called a constant. Constants
has two types Numeric Constant and Character Constant. To declare a constant const keyword or
preprocessor can be used Example cons int x=10; # define x 10
9) What is data type?
Data type is defined as the set of values and a asset of operations allowed on those values. It also tells about the
Memory required to store data. Data types are divided in two categories.
(a) Standard Data Type : - Data types that are defined as the part of language are called standard data types.
(b) User Defined Data Type: - Data types that are define by the programmer are called user defined data types.
10) What is scientific or exponent notation?
Real number are also called floating point numbers and these numbers can be expressed in scientific or exponent
notation. Every real number can be expressed as m and e. Where m represent mantissa(Value of number) and e
represent exponent (is the power to which it is raised).
11) What are overflow and underflow errors?
Overflow: - When a value is stored in a variable that is greater than its maximum range, an error occurs it called overflow.
Underflow: - When a value is stored in a variable that is less than its minimum range, an error occurs it called underflow.
12) What are operators and its types in c?
Operators are symbos, which are used to perform certain operations on data. C is equipped with a rich set of
operators. These include
Arithmetic Operator: - Operators used to perform arithmetic operations on numeric values eg. +, -, * and /.
Relational Operator: - Operators used to compare two values and always return true (1) or false (0); eg. <=, >= etc
Logical Operator: - Operators that combine two or more relational expressions to construct compound expression are
Called logical operators Example Logical And (&&) , Logical Or(||) Logical Not (!).
Increment Operator: - A double ++ sign is called increment operator. That can be used as post fix and prefix.
Decrement Operator: - A double - - sign is called decrement operator. That can be used as post fix and prefix.
Assignment Operator: - The symbol = is called assignment operator. It is used to store a value or result in a variable.
Compound Assignment Operator: - Combinaton of assignment operator with arithmetic operator is called compound
Assignment operator For Example +=, - =, * = , / =.
13) What is compound expression?
Combination of relational expressions and logical operators is called compound expression.
Example: - (x<y) &&(y<z)
14) What is order of precedence of operators?
The order in which different types of operators in an expression are evaluated is called order of precedence of
operator.
15) What is meant by Associativity of Operators?
The order in which operators of same precedence are evaluated is known as operator associativity. If in expression
operators of same precedence used then the expression can be evaluated from left to right or right to left.
16) Define Comments in C.
Comments are used to increase readability of the program. Comments explain the purpose of code. It help in
debugging. It has two types single line comment (//) and multiline comments (/* */).
17) Difference in string constant and character constant.
String Constant Character Constant
A set of characters written within a double quotation is Any character written within a single quotation is known
known as string constant. i.e. “Pakistan”, “123” as character constant. i.e. ‘a’, ‘$’.
18) Differentiate between implicit and explicit type casting.
Implicit Type Casting Explicit Type Casting
When one data type is changed in another data type When programmer change one data type into another
automatically is called implicit type casting. data type is called explicit type casting. It is performed
by using cast operator. i.e. (data type) expression;
19) List any four types of integer data in C-Language.
1. int 2. short int 3. long int 4. unsigned int
20) Differentiate between unary operator and binary operator.
Unary Operator Binary Operator
A type of operator that works with one operand is called A type of operator that works with two operand is called
unary operator. i.e. ++ , - - binary operator. Some binary operators are +, - , * , /

Long Question: -
1) Explain Rules of naming variables in C Language.
2) Explain operator and it’s types in C Language.
Chapter # 10 Important Short Questions
1) What is printf function?
Printf() function is used to display text messages and values of variables on monitor screen in a specific
format. It is also called formatted output function. Syntax is printf(“Format String”,Argument List);
2) What is format string?
It is also called control string. It is written in between double quotation marks. It may contain text, format
specifier and escape sequence.
3) What is format specifier?
It represents the format in which value of variable is displayed. It starts with % sign. Example %d, %c, %f.
4) What is Escape Sequence?
It controls the position of output displayed on the screen. Example \n, \t.
5) What is field width specifier?
Field width specifier is a numeric code or rule that specifies the minimum number of columns used to
print a value. It determines the space occupied by a value of the output screen. It is written in printf or
scanf statements between % and f. Example %4d if value is 22 then out put will be ||22.
6) What is the use of scanf () function. Write it’s syntax Or Define Scanf()?
Scanf is used to get input from the user. The input is stored in a variable in a specified form.
Syntax (“format string”, & variable1, & variable 2)
7) What is the use of ampersand (&) sign in scanf function?
The ampersand & refers to the memory location of the variable in which the input is stored. It is placed
before the variable name. It is also called address operator.
8) What will be the output of the following
Printf(“55\t”);
Printf(“555”);
Out put will be 55 555
9) Describe clrscr() function.
This function is used to clear the output screen console.
10) How getch() is different from getche() function?
getch() getche()
This function is used to input single character from user. This function is used to input single character from user.
It is an abbreviation of get character. When user enter a It is an abbreviation of get character with echo. When
character that character is not displayed on screen. user enter a character that character is not displayed on
screen.
11) Define Standard output.
This term refers to the output displayed on monitor. The result of program is standard output of program.
12) List some important function for input.
(1) scanf (2) gets() (3) getch() (4) getche()
13) List out different types of format specifier?
(1) Integer format specifier %d or %i (2) Character format specifier %c (3) Floating point format specifier %f
14) List down the names of escape character provided by c?
(1) \n insert new line (2) \t used to insert multiple space (3) \b generate effect of backspace (4)\’ insert single quote.
15) What is standard input?
Instructions or input provided by the keyboard to computer is called standard input, scanf() function is used to take
standard input from user.
Some Important Programs to practice are here as under

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy