Q : Write a program having function print_char( ) which receives a character and n integer as arguments. The function should print n times the entered character.
Q : What is pointer? How is it initialized? What is indirection operator? What is the scale factor?
Solution:
Pointer
A pointer is a special type of variable which hold physical address of a non pointer variable.Symbol * is used to make a pointer variable. Programmer can change a variable value from another location with the help of pointer. Call reference is an example of pointer , in which a variable physical address pass to a function and any change made inside of function direct affect actual value of passed variable due to pointer.
Add or subtract a variable value
by one. There are two types of prefix operator increment and decrement. If use
in any expression or equation then first increment or decrement variable then
solve related equitation with new value of related variable.