本文介绍了如何从输出中删除不需要的字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的代码是将输入字符串中的字符串复制到copystring并输出正确

但输出中有一些不需要的标记,如倒置?,等等



请帮助我新编程



我尝试过:



my code was to copy the string from inputstring to copystring and output was correct
but there were some unwanted signs in the output like inverted ?,", etc

please help me i m new to programming

What I have tried:

#include<stdio.h>
#include<string.h>

int main(){

    char inputstring[100],copystring[100];
    printf("enter the string ");
    gets(inputstring);

    strcat(copystring,inputstring);
    printf("inputstring = %s",inputstring);
    printf("copystring = %s",copystring);


}

推荐答案


这篇关于如何从输出中删除不需要的字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-25 08:43