repo.or.cz
/
glibc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Update.
[glibc.git]
/
stdio-common
/
bug6.c
blob
0db63a3b44e1bb0f03014d9fd07a25562461e99f
1
#include <stdio.h>
2
3
int
4
main
(
void
)
5
{
6
char
buf
[
80
];
7
int
i
;
8
int
lost
=
0
;
9
10
scanf
(
"%2s"
,
buf
);
11
lost
|= (
buf
[
0
] !=
'X'
||
buf
[
1
] !=
'Y'
||
buf
[
2
] !=
'\0'
);
12
if
(
lost
)
13
puts
(
"test of %2s failed."
);
14
scanf
(
" "
);
15
scanf
(
"%d"
, &
i
);
16
lost
|= (
i
!=
1234
);
17
if
(
lost
)
18
puts
(
"test of %d failed."
);
19
scanf
(
"%c"
,
buf
);
20
lost
|= (
buf
[
0
] !=
'L'
);
21
if
(
lost
)
22
puts
(
"test of %c failed.
\n
"
);
23
24
puts
(
lost
?
"Test FAILED!"
:
"Test succeeded."
);
25
return
lost
;
26
}