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 181 views
1 answer 248 views
1 answer 134 views
1 answer 217 views
1 answer 206 views
...