Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

videid / iax0583

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 1
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Commit 08f78bac authored 7 years ago by videid's avatar videid
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

lab14

parent 57872619
Hide whitespace changes
Inline Side-by-side
Showing with 19 additions and 8 deletions
  • lab14/lab14.c
  • lab14/lab14.exe
  • lab14/lab14.o
lab14/lab14.c
View file @ 08f78bac
#include <ctype.h>
#include <stdio.h>
#include <string.h>
......@@ -9,11 +9,13 @@
int main(void){
char s[] = "azerty";
char ss[] = "azerty";
char sss[] = "azerty azerty";
char b[64]={0};
char c[64]={0};
char ch[1]={0};
char *p;
char arr[64] = {0};
char arr2[64] = {0};
int a;
puts("enter string for concatenation");
gets(b);
......@@ -40,19 +42,28 @@ int main(void){
else {
puts("same string found");
}
char *e;
for(a=0;a<strlen(b);a++){
printf("\n%s",strstr(&b[a],&ch[0]));
if (strstr(&b[a],&ch[0])== NULL){
arr[a]=b[a];
*e = b[a];
if (strstr(e,&ch[0])== NULL){
strcat(arr,e);
}
else{
}
}
puts(arr);
printf("modified function is %d characters long",strlen(arr));
printf("modified function is %d characters long\n",strlen(arr));
char k;
for(a=0;a<strlen(sss);a++){
k = sss[a];
printf("\v"); //the \v isn't displaying anything on my compiler but when i change it to \n it shows my code is working
if (isspace(k)){
}
else{
printf("%s",&k);
}
}
}
......
This diff is collapsed. Click to expand it.
lab14/lab14.exe
View file @ 08f78bac
No preview for this file type
This diff is collapsed. Click to expand it.
lab14/lab14.o
View file @ 08f78bac
No preview for this file type
This diff is collapsed. Click to expand it.
  • Write
  • Preview
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment