edited by
216 views
0 votes
0 votes

Consider the following code.

#include<stdio.h> 
int main(int argc, char **argv)
{       
    printf(“%s\n”, argv[0]); 
    return 0;
}

If the program is compiled to an executable file named simple, what will be the output of the program when executed with the following command: ./simple hello world

  1. World
  2. Hello
  3. Segmentation fault
  4. ./simple
edited by

Please log in or register to answer this question.

Answer:

Related questions

1 votes
1 votes
3 answers
3
admin asked Jan 5, 2019
383 views
What is the output of the following $\text{C}$ program?#include<stdio.h int main(void){ char s1[] = “Hello”; char s2[] = “World!”; s1 = s2; printf(“%s”,s1); }...