diff options
| author | Sven Eisenhauer <sven@sven-eisenhauer.net> | 2023-11-10 15:11:48 +0100 |
|---|---|---|
| committer | Sven Eisenhauer <sven@sven-eisenhauer.net> | 2023-11-10 15:11:48 +0100 |
| commit | 33613a85afc4b1481367fbe92a17ee59c240250b (patch) | |
| tree | 670b842326116b376b505ec2263878912fca97e2 /Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/EXPLASM/UTOATEST.C | |
| download | Studium-master.tar.gz Studium-master.tar.bz2 | |
Diffstat (limited to 'Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/EXPLASM/UTOATEST.C')
| -rw-r--r-- | Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/EXPLASM/UTOATEST.C | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/EXPLASM/UTOATEST.C b/Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/EXPLASM/UTOATEST.C new file mode 100644 index 0000000..5e411b5 --- /dev/null +++ b/Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/EXPLASM/UTOATEST.C @@ -0,0 +1,22 @@ +/* test utoa or utoa */
+
+#include <stdio.h>
+
+extern char *utoa( char *string, signed int num );
+
+int main()
+{
+ signed int num;
+ char buffer[ 12 ];
+
+ puts( "Enter number:" );
+
+ if( scanf( "%d", &num ) == 1 )
+ {
+ *utoa( buffer, num ) = 0; /* add string terminator */
+ puts( "utoa yields:" );
+ puts( buffer );
+ }
+
+ return( 0 );
+}
|
