what is the difference between
const char *p, char const *p, const char* const p
Answer Posted / magdaleen
In a const char *p the chrac pointed by 'p' is a const, so
u cant change the value of the charac ponted by 'p', but u
can make 'p' refer to some other location.
In a char const *p, the ptr 'p' is constant not the
character refered by it, so u can not make 'p' refer to
anyother location, but u can change the value of the charac
pointed by 'p'
| Is This Answer Correct ? | 10 Yes | 4 No |
Post New Answer View All Answers
What are lookup tables in c?
Define macros.
Are there any problems with performing mathematical operations on different variable types?
can we have joblib in a proc ?
How does placing some code lines between the comment symbol help in debugging the code?
Is there anything like an ifdef for typedefs?
Can include files be nested? How many levels deep can include files be nested?
How can you pass an array to a function by value?
In cryptography, you could often break the algorithm if you know what was the original (plain) text that was encoded into the current ciphertext. This is called the plain text attack. In this simple problem, we illustrate the plain text attack on a simple substitution cipher encryption, where you know each letter has been substituted with a different letter from the alphabet but you don’t know what that letter is. You are given the cipherText as the input string to the function getwordSets(). You know that a plain text "AMMUNITION" occurs somewhere in this cipher text. Now, you have to find out which sets of characters corresponds to the encrypted form of the "AMMUNITION". You can assume that the encryption follows simple substitution only. [Hint: You could use the pattern in the "AMMUNITION" like MM occurring twice together to identify this]
Why n++ execute faster than n+1 ?
How can I recover the file name given an open stream or file descriptor?
Declare the structure which contains the following members and write in C list of all students who score more than 75 marks. Roll No, Name, Father Name, Age, City, Marks.
What is the advantage of using #define to declare a constant?
C language questions for civil engineering
Are negative numbers true in c?