what is the difference between these initializations?
Char a[]=”string”;
Char *p=”literal”;
Does *p++ increment p, or what it points to?
Answer Posted / bee
logically, both are treated as array of characters(i.e.
string) but....
1) a is an array of characters(a string)
2) p is a pointer to an array of characters
the statement char *p = "literal" is equivalent to
char j[] = "literal"
char *p = j;
3) *p++ can be seen as *(p++)....
this is so because '++' has higher recedence over '*'
operator. so, it increments address by 1 unit and prints
the corresponding value value
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
How do shell structures work?
How is = symbol different from == symbol in c programming?
The postoder traversal is 7,14,3,55,22,5,17 Then ur Inorder traversal is??? please help me on this
Can you define which header file to include at compile time?
How can I display a percentage-done indication that updates itself in place, or show one of those twirling baton progress indicators?
"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above
What are the basic data types associated with c?
Tell me what are bitwise shift operators?
the question is that what you have been doing all these periods (one year gap)
What is memcpy() function?
I have written a pro*C program to fetch data from the cursor. where in i have used the concept of BULK FETCH.... each FETCH statement is taking lots of time to fetch specified number of rows at...
What is function what are the types of function?
What are the different types of constants?
What is the maximum no. of arguments that can be given in a command line in C.?
What are bitwise shift operators in c programming?