Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
Quiz-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
정용석
Quiz-1
Commits
bdc17b34
Commit
bdc17b34
authored
Jan 17, 2025
by
정용석
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.cpp 제거
parent
91490d5f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
49 deletions
+4
-49
Quiz.txt
+4
-3
quine.cpp
+0
-4
quiz6.cpp
+0
-42
No files found.
Quiz.txt
View file @
bdc17b34
...
...
@@ -107,6 +107,7 @@ Array, Linked List, Queue, Stack, Graph, Set, Map, Tree, Heap, ..
void my_strcpy(char *s1, char *s2) {
while(*s1++ = *s2++);
}
quiz6.cpp 참고
질문n. 자기자신을 출력하는 프로그램(quine)을 가장 자신있는 언어로 작성해보세요.
\ No newline at end of file
질문n. 자기자신을 출력하는 프로그램(quine)을 가장 자신있는 언어로 작성해보세요.
quine.cpp 참고
\ No newline at end of file
quine.cpp
deleted
100644 → 0
View file @
91490d5f
#include <stdio.h>
char
S
[]
=
"#include <stdio.h>%cchar S[] = %c%s%c;%cint main() { printf(S, 10, 34, S, 34, 10); return 0; }"
;
int
main
()
{
printf
(
S
,
10
,
34
,
S
,
34
,
10
);
return
0
;
}
\ No newline at end of file
quiz6.cpp
deleted
100644 → 0
View file @
91490d5f
#include <stdio.h>
#include <stdlib.h>
unsigned
int
my_strlen
(
char
*
s
){
unsigned
int
i
=
0
;
while
(
s
[
i
]
!=
'\0'
){
i
++
;
}
return
i
;
}
void
my_strcpy
(
char
*
s1
,
char
*
s2
)
{
char
copyS2
[
my_strlen
(
s2
)
+
1
];
int
i
=
0
;
while
(
s2
[
i
]
!=
'\0'
){
copyS2
[
i
]
=
s2
[
i
];
i
++
;
}
if
(
my_strlen
(
s1
)
<=
my_strlen
(
s2
)){
printf
(
"Error : 첫 번째 인자의 배열의 크기가 두 번째 인자의 크기보다 작기 때문에 정상적인 복사가 되지않습니다.
\n
"
);
}
else
{
while
(
*
s1
++
=
*
s2
++
);
}
}
int
main
()
{
char
s1
[]
=
"abcd"
;
char
s2
[]
=
"efghijk"
;
my_strcpy
(
s1
,
s2
);
printf
(
"%s
\n
%s
\n
"
,
s1
,
s2
);
char
s3
[]
=
"abcdefg"
;
char
s4
[]
=
"hijk"
;
my_strcpy
(
s3
,
s4
);
printf
(
"%s
\n
%s
\n
"
,
s3
,
s4
);
return
0
;
}
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