GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Programming  >  C
Go To First  |  Previous Question  |  Next Question 
 C  |  Question 183 of 453    Print  
According to ANSI specifications which is the correct way of declaring main() when it receives command line arguments?
A)

main(int argc, char *argv[])


B) main(argc,argv) int argc; char *argv[];
C) main() {int argc; char *argv[]; }
D) None of the above



  
Total Answers and Comments: 2 Last Update: March 24, 2006   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
January 07, 2006 11:04:34   #1  
Richa Yadav        

RE: According to ANSI specifications which is the corr...
a) main(int argc char *argv[])
 
Is this answer useful? Yes | No
March 23, 2006 23:22:58   #2  
balaji.g Member Since: January 2006   Contribution: 1    

RE: According to ANSI specifications which is the corr...
main(int argc char *argv[])
 
Is this answer useful? Yes | No

 Related Questions

The volatile modifier is a directive to the compiler’s optimizer that operations involving this variable should not be optimized in certain ways. There are two special cases in which use of the 

There are two situations in which to use a type cast. The first use is to change the type of an operand to an arithmetic operation so that the operation will be performed properly.  The second case 
Latest Answer : Type cast should be used in case of if we want to assign a void pointer to a pointer of some data type.eg:void *ptr;int *c;c=(int *)ptr; ...

A global variable that must be accessed from more than one file can and should be declared in a header file. In addition, such a variable must be defined in one source file. Variables should not be defined 
Latest Answer : A variable can be declare/define in a C Header without any kind of compilational/ logical errors. But it is against the coding specifications and it is not normally practiced. If proper Multiple inclusion protection macro is used, then there will be no ...

Declaring a variable means describing its type to the compiler but not allocating any space for it. Defining a variable means declaring it and also allocating space to hold the variable. You can also 
Latest Answer : int num;This statement is declaration and also defination since it also allocates memory for variable num.But when you use following statementextern int num;It is only declaration since you are not allocating memory here. ...

The benefit of using the const keyword is that the compiler might be able to make optimizations based on the knowledge that the value of the variable will not change. In addition, the compiler will try 
Latest Answer : A side effect benefit:Say you want to pass an argument that you do not want modified, but you do not want to pass by value.Solution pass as constant reference or pointer constant.int someFoo(myDataType const &chunkOfData);orint ...

A sorting program that sorts items that are on secondary storage (disk or tape) rather than primary storage (memory) is called an external sort. Exactly how to sort large data depends on what is meant 
Latest Answer : Any how after merging that it will create the same problem to sort out. Will you please explain about that? ...

Most operating systems, including DOS, provide a means to redirect program input and output to and from different devices. This means that rather than your program output (stdout) going to the screen; 
Latest Answer : By using the operators "" we can redirect the standard input and out streams.example : d:> jinto.exe > outputredirected                d:> ...

Streams can be classified into two types: text streams and binary streams. Text streams are interpreted, with a maximum length of 255 characters. With text streams, carriage return/line feed combinations 
Latest Answer : Will you please explain how binary mode takes less memory? ...

By using the sopen() function you can open a file in shared mode and explicitly deny reading and writing permissions to any other program but yours. This task is accomplished by using the SH_DENYWR shared 

The preprocessor will include whatever file you specify in your #include statement. Therefore, if you have the line  #include in your program, the file macros.inc will be included in 
Latest Answer : no ...


 Sponsored Links

 
Related Articles

Concepts of Object-Oriented Programming

Object Oriented JavaScript In this chapter you ll learn about OOP Object Oriented Programming and how it relates to JavaScript As an ASP NET developer you probably have some experience working with objects and you may even be familiar with concepts such as inheritance However unless you re already a
 

Planning and choosing the correct ERP

Planning and choosing the correct ERP It is very common to think that implementing a new software is an easy topic and can be solved in a few days However this is not always the case There are some systems that require more time than others for implementation and even more previous considerations ER
 

On-Line Transaction Processing

On-Line Transaction Processing On-Line Transaction Processing is a processing that supports the daily business operations. Also know as operational processing and OLTP.  An OLTP is a database which must typically allow the real-time processing of SQL transactions to support traditional reta
 

On-Line Analytical Processing

On-Line Analytical Processing On-Line Analytical Processing is a processing that supports the analysis of business trends and projections. It is also known as decision support processing and OLAP.  An OLAP software enables companies to have real-time analysis of data stored in a database. A
 

What is the use of truncate command?

Truncate command will delete all records and the most important thing to make note of truncate command is since truncate command cannot be rolled back one must make sure to take proper backup of table data before performing the truncate command. Truncate command is thus used to remove all rows from
 

How is the main() function declared?

The declaration of main can be done as int main() One more declaration that can be taken by main is command line arguments form int main(int argc, char *argv[]) or this can also be written as int main(argc, argv) int argc; char *argv[]; NOTE: It is not possible for one to declare the main
 

What happens when a variable is not initialized in main function?

When a variable is not initialized in main function it contains garbage value. This can be well seen from the example below main() { int x; printf(“%d”,x); z= sample() } sample() { printf(“Testing program”); } Output is   &n
 

How to define command line arguments

The main functions can have arguments passed which are called as command line arguments. There are two command line arguments: Argument count denoted by argc and Argument vector denoted by argv The argc is an integer variable which denotes the number of parameters passed and argv is pointer to a
 

SQL Programming

SQL Programming Overview Anybody who has done something for a long time has probably wanted to change how things work at some point or another. A worker at a mill might have found a more efficient way of cutting logs, or a mathematics teacher might have had a hand in changing a school’s al
 

The Interview Snafu

How to turn someone else’s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape