ExamVeda
Login
Home
C plus plus miscellaneous
?

What will be the output of the following C++ code if the following arguments are executed on terminal?
===============program.cpp=============
#include <iostream>
using namespace std;
int main(int argc, char const *argv[])
{
    for(int i=0;i<argc;i++)
	cout<<argv[i]<<"\n";
}
=======================================
================commands===============
$ g++ program.cpp -o output
$ ./output Hello World
=======================================

Answer & Solution
Correct Answer: Option A
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.