-
Pointer Use
Why do we use pointer instead of variable?
-
Finding a number which is a power of 2in a single step
How to find whether the given number is a power of 2 in single step (without using loops)?
-
When should a type cast be used?
There are two situations in which to use a type cast. The first use is to change the type of an operand to an arithmetic operation so that the operation will be performed properly. The second case is to cast pointer types to and from void * in order to interface with functions that expect or return void pointers. For example, the following line type casts the return value of the call to malloc()...
-
What are the characteristics of arrays in C?
1) An array holds elements that have the same data type 2) Array elements are stored in subsequent memory locations3) Two-dimentional array elements are stored row by row in subsequent memory locations.4) Array name represents the address of the starting element5) Array size should be mentioned in the declaration. Array size must be a constant expression...
-
-
-
-
-
What is pointer?
Pointer is used to store the address of given variable
-
-
-
-
If the program (myprog) is run from the command line as myprog 1 2 3 , What would be the output? main(int argc, char *argv[]) { int i; for(i=0;i<argc;i++) printf("%s",argv[i]); }
A) 1 2 3B) C:MYPROG.EXE123C) MYPD) None of the above
-
-
-
-
-
-
-
C Interview Questions
Ans