[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

C Programming :: Command Line Arguments - Discussion

Home > C Programming > Command Line Arguments > MCQs Questions Discussion

11 / 15

The following program (HelloProg) is run from the command line as HelloProg 1 2 3. what would be the output ?

#include
void main (int argc, char*argv[])
{
int i,j=0;
for (i=0; i < argc; i++)
j = j + atoi (argv[i]);
printf ("%d",j);
}

A123

BError

C6

D"123"

ENone of these

Answer: Option (Login/Signup)

Show Explanation

Asked In ::

Post Your Answer Here:     

No Discussion on this question yet!