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
What is the code for 3 questions and answer check in VisualBasic.Net?
1. Write a function to display the sum of two numbers in the following ways: By using (i) pass by value (ii) pass by address a. function with argument and with return value b. function with argument and without return value c. without argument , with return value d. without argument , without return value Note: Use pass by address.
Describe the complexity of Binary search, Quicksort and various other sorting and searching techniques..
Which built-in library function can be used to match a patter from the string?
In C language, a variable name cannot contain?
What is the general form of a C program?
what is the diffrenet bettwen HTTP and internet protocol
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create.
we called a function and passed something do it we have always passed the "values" of variables to the called function. such functions calles are called a) calls by reference b) calls by value c) calls by zero d) none of the above
Is boolean a datatype in c?
What is #include conio h?
What does void main return?
When a c file is executed there are many files that are automatically opened what are they files?
Where are some collections of useful code fragments and examples?
How many types of errors are there in c language? Explain