How to define a pointer to static string in C

1 Answer

0 votes
#include <stdio.h>

int main()
{
    const char* p = "C Programming";
    
    puts(p);

    return 0;
}



/*
run:

C Programming

*/

 



answered Jun 6, 2024 by avibootz
edited Jun 6, 2024 by avibootz

Related questions

2 answers 186 views
1 answer 252 views
1 answer 140 views
1 answer 218 views
1 answer 208 views
...