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 |
can we store values and addresses in the same array? explain
#include<stdio.h> main() {int i=1;j=1; for(;;) {if(i>5) break; else j+=1; printf("\n%d",j) i+=j; } }
Do you have any idea about the use of "auto" keyword?
What is the output from this program? #include <stdio.h> void do_something(int *thisp, int that) { int the_other; the_other = 5; that = 2 + the_other; *thisp = the_other * that; } int main(void) { int first, second; first = 1; second = 2; do_something(&second, first); printf("%4d%4d\n", first, second); return 0; }
Synonymous with pointer array a) character array b) ragged array c) multiple array d) none
What is enumerated data type in c?
b) 4 c) 6 d) 7 32. Any C program a) must contain at least one function b) need not contain ant function c) needs input data d) none of the above 33. Using goto inside for loop is equivalent to using a) continue b) break c) return d)none of the above 34. The program fragment int a=5, b=2; printf(“%d”,a+++++b); a) prints 7 b)prints 8 c) prints 9 d)none of the above 35. printf(“ab” , “cd”,”ef”); prints a) ab abcdef c) abcdef, followed by garbage value d) none of the above 36. Consider the following program segment. i=6720; j=4; while((i%j)==0) { i=i/j; j=j+1; } On termination j will have the value a) 4 b) 8 c) 9 d) 6720
How to use c/c++ code in JAVA
10 Answers CDAC, IBM, Satyam, Scope International,
main() { int i = 1; int num[] = {1,2,3,4}; num[i] = i++; printf("%d", num[i]); } what will be the output? }
22 Answers NDS, TCS,
What is sizeof c?
print out of string in this format; 1. "rajesh" 2. \n 3. %d
What is c mainly used for?