Top

Discussion

What will be the output of the program (sample.c) given below if it is executed from the command line (Turbo C in DOS)?
cmd> sample 1 2 3

/* sample.c */
#include

int main(int argc, char *argv[])
{
    int j;
    j = argv[1] + argv[2] + argv[3];
    printf("%d", j);
    return 0;
}

 

  • A.6
  • B.sample 6
  • C.Error
  • D.Garbage value

Answer: C

No answer description available for this question.

No comment is present. Be the first to comment.
Loading…

Post your comment