- This topic has 2 replies, 3 voices, and was last updated 12 years, 3 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
|
Microcontroller › 8051 › Significance of * (star) in this program
void lcd_disp(unsigned char C)
{
LCD=C;
LCD_RS=1;
LCD_EN=1;
delay_ms(1);
LCD_EN=0;
}
void lcd_data(unsigned char *disp)
{
while(*disp)
lcd_disp(*disp++);
}
This is a C program to display strings on LCD. I am not able to understand the significance of *(star) in this program. Please any one give the answer.
First of all you need a basic knowledge of C lang….
by the way it is not star but is is called as a POINTER…..
void lcd_data(unsigned char *disp)
{
while(*disp)
lcd_disp(*disp++);
}
explanation..
while(*disp) is conditional statament if Your character is not null ( ‘