current position:Home>Output a string at intervals with a pointer

Output a string at intervals with a pointer

2022-01-27 00:02:13 CSDN Q & A

Make a program , The string software Assign to a character array , Then input the string at intervals starting from the first letter . Please complete with a pointer .

Refer to the answer 1:
 #include <stdio.h>#include <string.h>int main(){    char s[] = "software";    char *p;    for(p = s; *p != '\0'; p+=2){        printf("%c",*p);    }    return 0;}

Refer to the answer 2:

Refer to the answer 3:

Write by hand first , Help you find problems

Refer to the answer 4:

copyright notice
author[CSDN Q & A],Please bring the original link to reprint, thank you.

Random recommended