|Hypertext Markup LanguageCascading Style SheetsExtensible Markup LanguageJava ScriptjQueryAngularJSOracle SQLOracle PL/SQLOracle D2K FormsOracle D2K ReportsOracle DatabaseJavaJava Database ConnectivityJava ServletJava Server PagesHibernateApache TomcatCC++PHPMy-SqlUnix/LinuxMS-DOSHR Interviews|
What are the usage of pointer in C?
A pointer is used in the following cases
What is Null Pointers?
A pointer is said to be a null pointer when its right value is either null or 0. Remember, a null pointernever point to valid data.
What is a pointer on pointer?
Pointer variable can hold the address of another pointer variable is known as a pointer on pointer.
What is the advantage of declaring void pointers?
The void pointer can be converted anytime into any generic type pointer by casting operator.
What is a pointer to a function?
A pointer can hold the reference of the function is called pointer to a function.
What is the difference between actual and formal parameters?
The parameters sent to the function at calling end are called as actual parameters while at the receiving of the function definition called as formal parameters.
What is Pass by Value & Pass by Reference?
Pass by Value:In this method,the value of each of the actual arguments in the calling function is copied into corresponding formal arguments of the called function.In pass by value,the changes made to formal arguments in the called function have no effect on the values of actual arguments in the calling function.
Pass by Reference:In this method,the addresses of actual arguments in the calling function are copied into formal arguments of the called function. This means that using these addresses, we would have an access to the actual arguments and hence we would be able to manipulate them.
What Is an Array?
An array is a collection of variables with same data type. Item of array is called an element. All elements in an array are referenced by the name of the array and are stored in a set of consecutive, adjacent memory slots.the index of an array starts from 0.
How do declare an array?
We can declare an array by specify its data type, name and the number of elements the array holds between square brackets immediately following the array name.
Can we access array using pointer in C language?
Yes, by holding the base address of array into pointer, we can access the array using pointer.
What is a string? How do you know its length?
In C, a string is a character array which is terminated by a null character (‘