Question-31. When to user -> (arrow) operator ?

Answer- If the structure/union variable is a pointer variable, to access structure/union elements the arrow operator is used.

 

Question-32. What are bit fields ?

Answer- We can create integer structure members of differing size apart from non-standard size using bit fields. Such structure size is automatically adjusted with the multiple of integer size of the machine.

 

Question-33. What are command line arguments ?

Answer- The arguments which we pass to the main() function while executing the program are called as command line arguments. The parameters are always strings held in the second argument (below in args) of the function which is array of character pointers. First argument represents the count of arguments (below in count) and updated automatically by operating system.

main( int count, char *args[]) {
}

 

Question-34. What are the different ways of passing parameters to the functions? Which to use when ?

Answer-

Call by value − We send only values to the function as parameters. We choose this if we do not want the actual parameters to be modified with formal parameters but just used.
• Call by reference − We send address of the actual parameters instead of values. We choose this if we do want the actual parameters to be modified with formal parameters

 

Question-35. What is the purpose of built-in stricmp() function ?

Answer- It compares two strings by ignoring the case.

 

Question-36. Describe the file opening mode “w+” ?

Answer- Opens a file both for reading and writing. If a file is not existing it creates one, else if the file is existing it will be over written.

 

Question-37. Where the address of operator (&) cannot be used ?

Answer- It cannot be used on constants. It cannot be used on variable which are declared using register storage class.

 

Question-38. Is FILE a built-in data type ?

Answer- No, it is a structure defined in stdio.h.

 

Question-39. What is reminder for 5.0 % 2 ?

Answer- Error, It is invalid that either of the operands for the modulus operator (%) is a real number.

 

Question-40. How many operators are there under the category of ternary operators ?

Answer- There is only one operator and is conditional operator (? : ).