Home » questions » Another challenging question regarding C,C++ ...?
Another challenging question regarding C,C++ ...?
int *ptr = a; // ok
int *ptr=&a[0]; // ok
scanf("%s",a); // ok
int *ptr=&a; // error ...why ?
(while ..)
scanf("%s",&a); // ok why ?
This is not any code segment. They r seprate statements. Use them in ur program and then tell me why
scanf("%s",&a); is allowed
while
char *ptr=&a; is not
here ... a is a string array. (char a[5];)

Answers
Web-designer ©
On 2006-08-14 06:11:50
Big H
On 2006-08-14 06:32:57
griz803
On 2006-08-14 10:02:13
poteryaniy much
On 2006-08-14 06:23:11