what is the difference between
const char *p, char const *p, const char* const p

Answer Posted / vignesh1988i

CONST char *p:
here the const. keyword is coming before the data
type... so the string here will be the constant but not he
pointer...
char CONST *p:
here also the string will be the constant but not the
pointer...
CONST char* CONST p:
here both , the string as well the pointer will be constant

Is This Answer Correct ?    64 Yes 32 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

main() { struct s1 { char *str; struct s1 *ptr; }; static struct s1 arr[] = { {"Hyderabad",arr+1}, {"Bangalore",arr+2}, {"Delhi",arr} }; struct s1 *p[3]; int i; < BR> for(i=0;i<=2;i++) p[i] = arr[i].ptr; printf("%s ",(*p)->str); printf("%s ",(++*p)->str); printf("%s ",((*p)++)->str); }

905


Are enumerations really portable?

585


What is the modulus operator?

725


using only #include and #include Write a program in C that will read an input from the user and print it back to the user if it is a palindrome. The string ends when it encounters a whitespace. The input string is at most 30 characters. Assume the string has no spaces and distinguish between and lowercase. So madam is a palindrome, but MadAm is not a palindrome. Use scanf and %s to read the string. Sample Test: Enter a string: madam madam is a palindrome. Enter a string: 09023 09023 is not a palindrome.

1302


What’s a signal? Explain what do I use signals for?

595






Why is c called a structured programming language?

662


What are the different types of endless loops?

608


What is meant by type casting?

616


"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above

601


What are header files? What are their uses?

628


What is a far pointer in c?

588


How many types of sorting are there in c?

596


‘SAVEPOINT’ and ‘ROLLBACK’ is used in oracle database to secure the data comment. Give suitable examples of each with sql command.

1867


if (i = 0)printf ("True"); elseprintf("False"); Under what conditions will the above print out the string "True" a) Never b) Always c) When the value of i is 0 d) all of the above

697


What is the use of linkage in c language?

603