24.what is a void pointer?
25.why arithmetic operation can’t be performed on a void
pointer?
26.differentiate between const char *a; char *const a;
and char const *a;
27.compare array with pointer?
28.what is a NULL pointer?
29.what does ‘segmentation violation’ mean?
30.what does ‘Bus Error’ mean?
31.Define function pointers?
32.How do you initialize function pointers? Give an example?
33.where can function pointers be used?
Answers were Sorted based on User's Feedback
Answer / fakkad
24: void pointer can point any type of data.
31: int (*fun)(int) //pointer to a function which takes an
int as an argument and returns an int;
32: int (*fun)(int) = NULL; // initializing with NULL
| Is This Answer Correct ? | 5 Yes | 0 No |
Answer / abhijit
http://www.c4learn.com/illegal-arithmetic-operations-with-pointer.html
| Is This Answer Correct ? | 1 Yes | 0 No |
What does the message "warning: macro replacement within a string literal" mean?
write a function that accepts an integer/char array and an search item.If the search item is there in the array return position of array and value else return -1.without using other array,without sorting,not to use more than one loop?
for questions 14,15,16,17 use the following alternatives:a.int b.char.c.string.d.float
what is the different bitween abap and abap-hr?
discuss the steps needed to get a program from source code to executable in a system?
program that accepts amount in figures and print that in words
2 Answers Infosys, Lovely Professional University, Wipro,
what is diference between return 0 and return NULL??
How can I increase the allowable number of simultaneously open files?
Can anyone tell what is stack overflow? what precaution we should take?
Just came across this question, felt worth sharing, so here it is I want you to make a C/C++ program that for any positive integer n will print all the positive integers from 1 up to it and then back again! Let's say n=5 I want the program to print: 1 2 3 4 5 4 3 2 1. Too easy you say? Okay then... You can ONLY USE: 1 for loop 1 printf/cout statement 2 integers( i and n) and as many operations you want. NO if statements, NO ternary operators, NO tables, NO pointers, NO functions!
What does main () mean in c?
exit () is used to a) exit () terminates the execution of the program itself b) exit () terminates the execution of the loop c) exit () terminates the execution of the block d) none of the above