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 316 views
1 answer 347 views
1 answer 228 views
1 answer 296 views
1 answer 285 views
...