repo.or.cz
/
glibc
/
history.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Mon May 13 12:03:03 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
[glibc/history.git]
/
stdio-common
/
scanf5.c
blob
b52e853344af0500106306c5430f1b3423bc80ef
1
#include <stdio.h>
2
3
int
4
main
()
5
{
6
int
a
,
b
;
7
8
a
=
b
= -
1
;
9
sscanf
(
"12ab"
,
"%dab%n"
, &
a
, &
b
);
10
printf
(
"%d, %d
\n
"
,
a
,
b
);
11
if
(
a
!=
12
||
b
!=
4
)
12
abort
();
13
14
a
=
b
= -
1
;
15
sscanf
(
"12ab100"
,
"%dab%n100"
, &
a
, &
b
);
16
printf
(
"%d, %d
\n
"
,
a
,
b
);
17
if
(
a
!=
12
||
b
!=
4
)
18
abort
();
19
return
0
;
20
}