I'm using C and I was wondering how you could take a text and look for a specific character and start printing only from there. Here's my code.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
#include <stdio.h>
#include"stdlib.h"
#include <unistd.h>
#include <string.h>
#define SIZE 1024
int main(int argc, char *argv[20])
{
char text[SIZE];
printf("Enter text");
scanf("%s", text);
for (int i = 0; i < SIZE; i++) {
if (strcmp(text[i],"<"))
{
printf("%s", text[i]);
}
}
return 0;
}
|
Last edited on