what's the o/p
int main(int n, char *argv[])
{
char *s= *++argv;
puts(s);
exit(0);
}
Answer Posted / sreed
first command line argument
lets say..
exe for above prog is a.out
execute command
a.out arg1 arg2 arg3
then out put will be arg1
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Define VARIABLE?
Is it better to use malloc() or calloc()?
How can I send mail from within a c program?
What are predefined functions in c?
a program that performs some preliminary processing in C, it acts upon certain directives that will affect how the compiler does its work a) compiler b) loader c) directive d) preprocessor
How will you find a duplicate number in a array without negating the nos ?
How can you check to see whether a symbol is defined?
How to write a code for implementing my own printf() and
scanf().... Please hep me in this... I need a guidance...
Can you give an coding for c... Please also explain about
the header files used other than #include
a=10;b= 5;c=3;d=3; if(a printf(%d %d %d %d a,b,c,d) else printf("%d %d %d %d a,b,c,d);
Explain how do you print an address?
What is header file in c?
How are structure passing and returning implemented?
Is there any possibility to create customized header file with c programming language?
What is the use of clrscr?
What should malloc() do? Return a null pointer or a pointer to 0 bytes?