glib/tests/helloworld.c
branchRCL_3
changeset 56 acd3cd4aaceb
equal deleted inserted replaced
54:4332f0f7be53 56:acd3cd4aaceb
       
     1 /* Portions copyright (c) 2009 Nokia Corporation.  All rights reserved.*/
       
     2 /* Description:
       
     3 * This is a test application used by g_spawn APIs. This application
       
     4 * is spawned by them.
       
     5 */
       
     6 
       
     7 #include <stdio.h>
       
     8 
       
     9 int main(int argc,char *argv[])
       
    10 {
       
    11 	int i;
       
    12 	FILE *fp;
       
    13 
       
    14 	fp = fopen("c:\\Helloworld.txt", "w");
       
    15 
       
    16 	if(!fp)
       
    17 	{
       
    18 		printf("File creation failed\n");
       
    19 		return 0;
       
    20 	}
       
    21 	
       
    22 	fprintf(fp,"argc = %d\n", argc );
       
    23 		
       
    24 	for(i=0;i<argc;i++)
       
    25 	{
       
    26 		fprintf(fp,"argv[%d] = %s\n",i,argv[i]);
       
    27 	}
       
    28 	
       
    29 	fclose(fp);
       
    30 	return 0;
       
    31 }