General discussion

Locked

C PROGRAM CORRECTION

By john_bosko ·
HI!

I HAVE WRITTEN A SIMPLE PROGRAM IN 'C', ALL IT HAS TO DO IS DISPLAY THE FIRST COMMAND LINE PARAMETER..

MY CODE IS

# include <stdio.h>

int main(int argc, char *argv[])
{
printf("hello %s", argv[0]);
getch(); }

THE ERROR I GET WHILE COMPIPLING IS..

d:\cprog\j_first: 49,52: Parse Error, expecting `')'' or `',''
'main(int argc,char *argv[]) { printf("hello %s", argv[0])'

PLEASE HELP.
THANK YOU

This conversation is currently closed to new comments.

11 total posts (Page 2 of 2)   Prev   01 | 02
Thread display: Collapse - | Expand +

All Comments

Back to Web Development Forum
11 total posts (Page 2 of 2)   Prev   01 | 02

Related Discussions

Related Forums