Question-121. What is the acronym for ANSI ?

Answer- American National Standard Institute.

 

Question-122. What is the difference between getch() and getche() ?

Answer- The getch() function reads a single character from keyboard. It doesn’t uses any buffer, so entered data is not displayed on the output screen.

The getche() function reads a single character from keyword but data is displayed on the output screen. Press Alt+f5 to see the entered character.

Question-123. What is new line escape sequence ?

Answer- The new line escape sequence is represented by “\n”. It inserts a new line on the output screen.

 

Question-124. What is the difference between near, far and huge pointers ?

Answer- A virtual address is composed of selector and offset.

A near pointer doesn’t have explicit selector whereas far and huge pointers have explicit selector. When you perform pointer arithmetic on far pointer, selector is not modified but in case of huge pointer it can be modified.

These are the non-standard keywords and implementation specific. These are irrelevant in modern platform.

Question-125. What is the maximum length of an identifier ?

Answer- It is 32 characters ideally but implementation specific.

 

Question-126. What is typecasting ?

Answer- Converting one data type into another is known as typecasting. For example:

float f=3.4;  
int a=(int)f;//typecasting

 

Question-127. What are the functions to open and close file in C language ?

Answer- The fopen() function is used to open file whereas fclose() is used to close file.

 

Question-128. Can we access array using pointer in C language ?

Answer- Yes, by holding the base address of array into pointer, we can access the array using pointer.

 

Question-129. What is infinite loop ?

Answer- A loop running continuously for indefinite number of times is called infinite loop.

Infinite For Loop:

for(;;){  
//code to be executed  
}  
Infinite While Loop:

while(1){  
//code to be executed  
}  
Infinite Do-While Loop:

do{  
//code to be executed  
}while(1);

 

Question-130. Write a program to print “hello world” without using semicolon ?

Answer- There are various ways to do so. Let’s see a program to print “hello world” using if.

#include    
void main(){    
   if(printf("hello world")){}    
}