#include <stdio.h>
#include <string.h>
//删除字符串头部的空白字符。
int main()
{
char code[]=" hello World"; //
int len=sizeof(code);
char buf[16];
int count=0;
int i=0;
for(i=0;i<len;i++)
{
if(code[i]==' ')
{
continue;
}
else
{
for(int j=i;j<len;j++)
{
buf[count++]=code[j];
}
break;
}
}
return 0;
}
#include <stdio.h>
#include <string.h>
//删除字符串头部的空白字符。
int main()
{
char code[]=" hello World"; //
int len=sizeof(code);
char buf[16];
int count=0;
int i=0;
for(i=0;i<len;i++)
{
if(code[i]==' ')
{
continue;
}
else
{
for(int j=i;j<len;j++)
{
buf[count++]=code[j];
}
break;
}
}
return 0;
}