glib/tests/helloworld.c
changeset 18 47c74d1534e1
child 34 5fae379060a7
equal deleted inserted replaced
0:e4d67989cc36 18:47c74d1534e1
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 /* Description:
       
    19 * This is a test application used by g_spawn APIs. This application
       
    20 * is spawned by them.
       
    21 */
       
    22 
       
    23 #include <stdio.h>
       
    24 
       
    25 int main(int argc,char *argv[])
       
    26 {
       
    27 	int i;
       
    28 	FILE *fp;
       
    29 
       
    30 	fp = fopen("c:\\Helloworld.txt", "w");
       
    31 
       
    32 	if(!fp)
       
    33 	{
       
    34 		printf("File creation failed\n");
       
    35 		return 0;
       
    36 	}
       
    37 	
       
    38 	fprintf(fp,"argc = %d\n", argc );
       
    39 		
       
    40 	for(i=0;i<argc;i++)
       
    41 	{
       
    42 		fprintf(fp,"argv[%d] = %s\n",i,argv[i]);
       
    43 	}
       
    44 	
       
    45 	fclose(fp);
       
    46 	return 0;
       
    47 }