Friday, September 4, 2009

C Skills : Tutor -2 : Pointer declaration

What's wrong with this declaration?

char * t1,t2;


Answer : t1 is a pointer to char and t2 is a char .

if we want both t1 and t2 as pointer to char, below is the declaration for the same:

char *t1,*t2;


P.S : The tutorial only covers few important tricks of the language , This is only for people who have some basic knowledge of the language.

No comments:

Post a Comment