What is the difference between constant pointer and pointer
to a constant. Give examples.
Answer Posted / prashant
the example given by Santosh for "Constant Pointer" is wrong .
Use
int * const p = &localVariable;
instead of const int *p = &localVariable;.
then we cant do p++ or p--;
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
What is the sizeof () a pointer?
What is use of integral promotions in c?
What are the types of data structures in c?
What is %d used for?
Are the outer parentheses in return statements really optional?
Differentiate between the = symbol and == symbol?
What are the loops in c?
Is c++ based on c?
What is a header file?
What is the difference between single charater constant and string constant?
Explain b+ tree?
Sir,please help me out with the code of this question. Write an interactive C program that will encode or decode multiple lines of text. Store the encoded text within a data file, so that it can be retrieved and decoded at any time. The program should include the following features: (a) Enter text from the keyboard, encode the text and store the encoded text in a data file. (b) Retrieve the encoded text and display it in its encoded form. (c) Retrieve the encoded text, decode it and then display the decoded text. (d) End the computation. Test the program using several lines of text of your choice.
general for is %wd,f-d; in this system "w" means a) 'w' represent total width of digits b) 'w' represent width which includes the digits before,after decimal place and the decimal point c) 'w' represent width which includes the digits before only d) 'w' represent width after decimal place only
What is the difference between fread buffer() and fwrite buffer()?
What does %2f mean in c?