题解 | #复制部分字符串#

复制部分字符串

https://www.nowcoder.com/practice/8f5b923683b94e549880e3c8370e3e55

#include<stdio.h>
#include<string.h>
int main() {
    char a[30] = { 0 };
    int m = 0;
    scanf("%s%d", a, &m);
    char *pa = &a[0];
    for (int i = m-1; i < strlen(a); i++) {
        printf("%c", *(pa + i));
    }
    return 0;
}

全部评论

相关推荐

uu们,拒offer时hr很生气怎么办我哭死
爱睡觉的冰箱哥:人家回收你的offer,或者oc后没给你发offer的时候可不会愧疚你,所以你拒了也没必要愧疚他。
点赞 评论 收藏
分享
点赞 评论 收藏
分享
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务