-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
When should the register modifier be used? Does it really help?
The register modifier hints to the compiler that the variable will be heavily used and should be kept in the CPU’s registers, if possible, so that it can be accessed faster. There are several restrictions on the use of the register modifier. First, the variable must be of a type that can be held in the CPU’s register. This usually means a single value of a size less than or equal to the size of an...
-
What is the output for the following code
main{int x=90;float *ptr;ptr=(float *)&x;*ptr=50.0;printf("%d",x);printf("%f",*pf);}Though the address of i & pf are same but the value which i get when i print x is a different integer value and when *pf is printed it gives the value 50.0 .why?
-
-
-
Write the equivalent expression for x%8?
x&7 Write expressions to swap two integers without using a temporary variable?
C Interview Questions
Ans