source: CIVL/examples/languageFeatures/printf.cvl@ 7a7bed3

1.23 2.0 main test-branch
Last change on this file since 7a7bed3 was 0293c3b, checked in by Manchun Zheng <zmanchun@…>, 12 years ago

Improved the translation of array literal initializers for pointer type variables.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@560 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 549 bytes
Line 
1#include<stdio.h>
2$input int x;
3$input double y;
4$input char * z;
5
6int main(int argc, char * argv[]){
7 int i = 58;
8 double d = 33.3333333;
9 float f = 33.333;
10 char * s = "test%dString";
11 double A[2];
12
13 printf("test0 aabb\r\n");
14 printf("test1 aa\nbb aa\bbb aa\tbb \' \" \n");
15 printf("test2 %d, %o, %x \n", i,i,i);
16 printf("test3 %.16f,%e,%g,%a\n", d,d,d,d);
17 printf("test4 %.8f,%e,%g,%a\n", f,f,f,f);
18 printf("test5 %d,%s\n", i-20,s);
19 printf("test6 %d,%.16f,%s\n", x,y,z);
20 printf("test7 %d\n", &x);
21 printf("test8 %f\n", A[0]);
22}
Note: See TracBrowser for help on using the repository browser.