Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
videid
/
iax0583
This project
Loading...
Sign in
Toggle navigation
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
Dec 21, 2017
by
videid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lab14
parent
57872619
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
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 <stdio.h>
#include <string.h>
#include <string.h>
...
@@ -9,11 +9,13 @@
...
@@ -9,11 +9,13 @@
int
main
(
void
){
int
main
(
void
){
char
s
[]
=
"azerty"
;
char
s
[]
=
"azerty"
;
char
ss
[]
=
"azerty"
;
char
ss
[]
=
"azerty"
;
char
sss
[]
=
"azerty azerty"
;
char
b
[
64
]
=
{
0
};
char
b
[
64
]
=
{
0
};
char
c
[
64
]
=
{
0
};
char
c
[
64
]
=
{
0
};
char
ch
[
1
]
=
{
0
};
char
ch
[
1
]
=
{
0
};
char
*
p
;
char
*
p
;
char
arr
[
64
]
=
{
0
};
char
arr
[
64
]
=
{
0
};
char
arr2
[
64
]
=
{
0
};
int
a
;
int
a
;
puts
(
"enter string for concatenation"
);
puts
(
"enter string for concatenation"
);
gets
(
b
);
gets
(
b
);
...
@@ -40,19 +42,28 @@ int main(void){
...
@@ -40,19 +42,28 @@ int main(void){
else
{
else
{
puts
(
"same string found"
);
puts
(
"same string found"
);
}
}
char
*
e
;
for
(
a
=
0
;
a
<
strlen
(
b
);
a
++
){
for
(
a
=
0
;
a
<
strlen
(
b
);
a
++
){
printf
(
"
\n
%s"
,
strstr
(
&
b
[
a
],
&
ch
[
0
]))
;
*
e
=
b
[
a
]
;
if
(
strstr
(
&
b
[
a
]
,
&
ch
[
0
])
==
NULL
){
if
(
strstr
(
e
,
&
ch
[
0
])
==
NULL
){
arr
[
a
]
=
b
[
a
]
;
strcat
(
arr
,
e
)
;
}
}
else
{
}
}
}
puts
(
arr
);
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
);
}
}
}
}
...
...
lab14/lab14.exe
View file @
08f78bac
No preview for this file type
lab14/lab14.o
View file @
08f78bac
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment