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
(+cflags): Append to this instead of CFLAGS.
[glibc.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
}