ExamVeda
Login
Home
This question belongs to MySQL MySQL Miscellaneous
MySQL Miscellaneous
?

Which option is used for specifying the executable name while compiling with gcc?

Answer & Solution
Correct Answer: Option B
This question is about compiling programs using the gcc compiler. When you compile a program, you need to tell the compiler what you want the final executable file to be called.

The -o option is used to specify the executable name. So, the correct answer is Option B.

Let's break it down further:

- gcc is the command used to compile programs in C and C++.
- -o is a flag that tells the compiler the name of the output executable file.

For example, to compile a program called myprogram.c and create an executable called myprogram, you would use this command:
gcc myprogram.c -o myprogram
The other options are not used for specifying the executable name:
- -e is used for defining an environment variable.
- -a is not a valid flag for the gcc compiler.
- -b is not a valid flag for the gcc compiler.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.