source: CIVL/examples/languageFeatures/arrayLiteral.cvl@ 28717d7

1.23 2.0 main test-branch
Last change on this file since 28717d7 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: 222 bytes
Line 
1#include<stdio.h>
2void main(){
3char* a = "abc";
4int b = 9;
5int* c = &b;
6printf("a is %s\n", a);
7printf("b is %d\n", *c);
8printf("a is %s\n", "not really a.");
9int* test=(int[]){[2]=9};
10printf("test[2] is %d", test[2]);
11}
12
Note: See TracBrowser for help on using the repository browser.