What is the difference between char a[] = "string"; and
char *p = "string"; ?
Answer Posted / dharanidhar
P is a pointer which is constant. So, the values in this
array cannot be modified.
characters within a[] can be changed by accessing
like a[1] = '2',....
| Is This Answer Correct ? | 1 Yes | 3 No |
Post New Answer View All Answers
What is the explanation for the dangling pointer in c?
What is a good data structure to use for storing lines of text?
How do I determine whether a character is numeric, alphabetic, and so on?
Write a program to display all the prime nos from 1 to 1000000, your code should not take time more than a minute to display all the nos.
What is signed and unsigned?
Is struct oop?
Why do we need a structure?
What is difference between arrays and pointers?
Create a registration form application by taking the details like username, address, phone number, email with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 3 users and display the details. While taking input password must appear as “****”.
a value that does not change during program execution a) variabe b) argument c) parameter d) none
Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?
What is abstract data structure in c?
Can we compile a program without main() function?
Why is void main used?
What are the 5 types of inheritance in c ++?