How to get part of a string start from character N to end of string in C

1 Answer

0 votes
#include <stdio.h>

#define N 4 
     
int main()
{
	char s[32] = "c c++ java php python";

    const char *s_from_n  = &s[N];
     
    puts(s_from_n);
 
    return 0;
}
   
   
/*
run:
   
+ java php python
   
*/

 



answered Feb 22, 2020 by avibootz

Related questions

...