what's the o/p
int main(int n, char *argv[])
{
char *s= *++argv;
puts(s);
exit(0);
}



what's the o/p int main(int n, char *argv[]) { char *s= *++argv; puts(s); exit(0); } ..

Answer / 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

More C Interview Questions

What is the right way to use errno?

0 Answers  


What is build process in c?

0 Answers  


What is difference between scanf and gets?

0 Answers  


What is an example of enumeration?

1 Answers  


Explain how to reverse singly link list.

0 Answers  






What are identifiers in c?

0 Answers  


What is calloc()?

0 Answers   Adobe,


What are the difference between a free-standing and a hosted environment?

0 Answers   Infogain,


Write a C program to help a HiFi’s Restaurant automate its breakfast billing system. Your assignment should implement the following items: a. Show the customer the different breakfast items offered by the HiFi’s Restaurant. b. Allow the customer to select more than one item from the menu. c. Calculate and print the bill to the customer. d. Produce a report to present your complete program and show more sample output. Assume that the HiFi’s Restaurant offers the following breakfast menu: Plain Egg $2.50 Bacon and Egg $3.45 Muffin $2.20 French Toast $2.95 Fruit Basket $3.45 Cereal $0.70 Coffee $1.50 Tea $1.80

0 Answers  


to write a program, that finds the minimum total number of shelves, including the initial one, required for this loading process. The packets are named A, B, C, D, E …….. Any numbers of packets with these names could be kept in the shelf, as in this example: [ZZLLAAJKRDFDDUUGGYFYYKK]. All packets are to be loaded on cars. The cars are lined in order, so that the packets could be loaded on them. The cars are also named [A, B, C, D, E,………….].

2 Answers   Infosys, TCS,


the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none

0 Answers  


How do you redirect a standard stream?

0 Answers  


Categories