Function returning pointer to character in c

char const*uuu(){
    char const *string="G. Bush";
    return string;
}
void main(){
    char const *ptr;
    ptr=uuu();
    clrscr();
    printf("%s",ptr+3);
    getch();
}
Output:Bush
Post a Comment