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 320 views
1 answer 351 views
1 answer 230 views
1 answer 301 views
1 answer 291 views
...