Wipro
Company
Programming
Technical
What is the difference between char *a and char a[]?
Read Solution (Total 12)
-
- char *a is character pointer and char a[] is char array
- 10 years agoHelpfull: Yes(8) No(2)
- char *a means a is a pointer to an array of elements which are of character type whereas char a[] means a is an array of elements which are of character type.
- 10 years agoHelpfull: Yes(4) No(2)
- Pointer having type for accessing type variable
here the char *a;
a is the pointer type of char it's locate on 1 byte data..
another pointer types are int *a,float *a,void *a(accessing all types of variables through typecasting)
whereas char a[] is an array type charecter - 10 years agoHelpfull: Yes(2) No(0)
- char*p is a variable
but a char a[] is an array - 10 years agoHelpfull: Yes(1) No(0)
- char *a=it points the character a.it represents address.
char a[]=it points the array of a.it has data. - 10 years agoHelpfull: Yes(0) No(0)
- char *a is the address of the a value.
char a[] is the array of the a. - 10 years agoHelpfull: Yes(0) No(0)
- char *a is character pointer where as char a[] is a character array.
- 10 years agoHelpfull: Yes(0) No(0)
- one is pointer other is array
- 10 years agoHelpfull: Yes(0) No(0)
- char *a="hai"; is written then the string is stored in the read only memory location and any modifications in this can be illegal. char []="hai"; then this is also stored in read only memory location but it can be modified.
- 10 years agoHelpfull: Yes(0) No(0)
- char *a--->pointer variable returns character value or pointing to character,
char a[] or char *(a+null) --->character array pointing to null values which is starting address of an array values,,,,(note: array itself is pointing to an address implicitly we can call this as array pointer --->pointing address) - 9 years agoHelpfull: Yes(0) No(0)
- char *a is a value of character type at address a and char a[] is an array which stores the values of character type
- 9 years agoHelpfull: Yes(0) No(0)
- char *a is used to store the address of the character a
char a[] is used to create an character array means string - 5 years agoHelpfull: Yes(0) No(0)
Wipro Other Question