APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY Previous Years Question Paper & Answer

Course : B.Tech

Semester : S1 and S2

Year : 2017

Term : DECEMBER

Branch : BIOTECHNOLOGY

Scheme : 2015 Full Time

Course Code : CS 100

Page:2





PDF Text (Beta):

1

a) Write notes Qualifiers in C. (5)
b) Write notes on Control statements in C. Give Examples for each. (10)

a) Qualifiers

Qualifiers are the keywords just using to alter the meaning of basic data types to yield a new data type.

Following are the important qualifiers in 0.

٠ Size qualifiers

‎51೧ qualifiers‏ ٭

‎٠ Constant qualifiers
* Volatile qualifiers

‎Size Qualifiers

‎Size qualifiers are the keywords using to alter the size of basic data types. They are 1009 and short. For integer data
types, there are three sizes: int, and two additional sizes called long and short, which are declared as long int and
short int. The keywords long and short are called sub-type qualifiers. The long is intended to provide a larger
size of integer, and short is intended to provide a smaller size of integer. However, not all implementations provide
distinct sizes for them. The requirement is that short and int must be at least 16 bits, long must be at least 32
bits, and that short is no longer than int, which is no longer than long. Typically, short is 16 bits, long is 32 bits, and
int is either 16 or 32 bits.

‎Eg:- long int, long float, short double etc.

‎Sign Qualifiers

‎Sign qualifiers are two signed and unsigned. signed is default one, i.e., declaring int
a; Is same as signed int a;
both can store both +ve and ‏عبج‎ numbers. Declaring a variable unsigned int a;

‎can only store +ve values Constant Qualifier

‎If you are declaring a variable as: cost int a=2; then you

‎can never change the value of a in the program.

‎Volatile Qualifiers

‎If you are declaring a variable as: Volatile int a=3;

‎means you can change the value of variable a whenever needed. Normally all variables are by default volatile in C.

‎b) CONTROL STATEMENTS

Similar Question Papers