Question-61. How does bitwise operator XOR works ?

Answer- If both the corresponding bits are same it gives 0 else 1.

 

Question-62. What is an infinite loop ?

Answer- A loop executing repeatedly as the loop-expression always evaluates to true such as

while(0 == 0) {
}

 

Question-63. Can variables belonging to different scope have same name ? If so show an example.

Answer- Variables belonging to different scope can have same name as in the following code snippet.

int var;

void f() { 
   int var; 
}

main() { 
   int var; 
}

 

Question-64. What is the default value of local and global variables ?

Answer- Local variables get garbage value and global variables get a value 0 by default.

 

Question-65. Can a pointer access the array ?

Answer- Pointer by holding array’s base address can access the array.

 

Question-66. What are valid operations on pointers ?

Answer- The only two permitted operations on pointers are

 i) Comparision ii) Addition/Substraction (excluding void pointers)

 

Question-67. What is a string length ?

Answer- It is the count of character excluding the ‘\0’ character.

 

Question-68. What is the built-in function to append one string to another ?

Answer- strcat() form the header string.h

 

Question-69. Which operator can be used to access union elements if union variable is a pointer variable ?

Answer- Arrow (->) operator.

 

Question-70. Explain about ‘stdin’ ?

Answer- stdin in a pointer variable which is by default opened for standard input device.