wats the diference btwen constant pointer and pointer to a
constant.pls give examples.
Answer Posted / sanjay
Pointer to a consttant ::: such that the value to which
pointer points can't be changed
const int *ptr1=7
*ptr=8 // invalid
constant pointer :::: pointer direction can't be cheged .
int *const x =6;
x=7 or x=&i // invalid
Location of pointer can't be chenged.
| Is This Answer Correct ? | 18 Yes | 2 No |
Post New Answer View All Answers
why do some people write if(0 == x) instead of if(x == 0)?
What is pointer and structure in c?
How are Structure passing and returning implemented by the complier?
The program will first compute the tax you owe based on your income. User is prompted to enter income. Program will compute the total amount of tax owed based on the following: Income Tax 0 - $45,000 = 0.15 x income $45,001 - $90,000 = 6750 + 0.20 x (income – 45000) $90,001 - $140,000 = 15750 + 0.26 x (income – 90000) $140,001 - $200,000 = 28750 + 0.29 x (income – 140000) Greater than $200,000 = 46150 + 0.33 x (income – 200000) Dollar amounts should be in dollars and cents (float point numbers with two decimals shown). Tax is displayed on the screen.
What is c language used for?
Describe how arrays can be passed to a user defined function
What are pointers?
can we change the default calling convention in c if yes than how.........?
Difference between pass by reference and pass by value?
Explain a pre-processor and its advantages.
What are header files and what are its uses in C programming?
#include show(int t,va_list ptr1) { int a,x,i; a=va_arg(ptr1,int) printf(" %d",a) } display(char) { int x; listptr; va_star(otr,s); n=va_arg(ptr,int); show(x,ptr); } main() { display("hello",4,12,13,14,44); }
What is n in c?
What are integer variable, floating-point variable and character variable?
Is there a way to switch on strings?