0

What are the differences between a char pointer function and a pointer function?

char *get_next_line(int fd)
{
    static char *str;
    char        *line;

    if (fd <= 0 || BUFFER_SIZE <= 0)
        return (0);
    
    
}

and

char* get_next_line(int fd)
{
    static char *str;
    char        *line;

    if (fd <= 0 || BUFFER_SIZE <= 0)
        return (0);
    
    
}
  • 1
    The difference is the style. Nothing more, nothing less. There's also no difference between those two, and `char * get_next_line(int fd)`. C is in many parts agnostic of white-space. You could have tabs, newlines, spaces and any other valid white-space character in between, how many of them you like, and mix and match. – Some programmer dude Nov 22 '22 at 19:50
  • For the most part, spaces are not significant between tokens in C. – Barmar Nov 22 '22 at 19:51
  • It's a little like the difference between "I'd have" and "I would've". :-) – Steve Summit Nov 22 '22 at 19:54

0 Answers0