ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C
 
 


 

 
 C interview questions  C Interview Questions
 C++ interview questions  C++ Interview Questions
 VC++ interview questions  VC++ Interview Questions
 Delphi interview questions  Delphi Interview Questions
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions
Question
what's the o/p
int main(int n, char *argv[])
{
char *s= *++argv;
puts(s);
exit(0);
}
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: what's the o/p int main(int n, char *argv[]) { char *s= *++argv; puts(s); exit(0); }
Answer
# 1
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 ?    0 Yes 0 No
Sreed
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
Can I pass constant values to functions which accept structure arguments?  2
Reverse the part of the number which is present from position i to j. Print the new number.[without using the array] eg: num=789876 i=2 j=5 778986  2
How to calculate Total working time using Login and logout? Wipro2
A function 'q' that accepts a pointer to a character as argument and returns a pointer to an array of integer can be declared as: A)int (*q(char*)) [] B)int *q(char*) [] C)int(*q)(char*) [] D)None of the Above Accenture2
2.Given the short c program that follows a. make a list of the memory variables in this program b.which lines of code contain operations that change the contents of memory? what are those operations? Void main( void) { Double base; Double height; Double area; Printf(“enter base and height of triangle :”); Scanf(“%lg”, &base); Scanf(“%lg”, &height); Area=base*height/2.0; Printf(“the area of the triangle is %g \n”,area); } Wipro1
What is the Difference between Class and Struct? Motorola9
Will Macros support multiple arguments ? Oracle7
What is the output of following program ? int main() { int x = 5; printf("%d %d %d\n", x, x << 2, x >> 2); } Qualcomm3
can we access one file to one directory?  1
what is the code for getting the output as * ** *** Caritor5
what does the following code do? fn(int n,int p,int r) { static int a=p; switch(n){ case 4:a+=a*r; case 3:a+=a*r; case 2:a+=a*r; case 1:a+=a*r; } } a.computes simple interest for one year b.computes amount on compound interest for 1 to 4 years c.computes simple interest for four year d.computes compound interst for 1 year TCS4
here is a link to download Let_Us_C_-_Yashwant_Kanetkar  2
N O S I E R + A S T R A L ---------------- 7 2 5 6 1 3 Honeywell2
what is c? Tech-Mahindra5
if array a conatins 'n' elements and array b conatins 'n-1' elements.array b has all element which are present in array a but one element is missing in array b. find that element. Zycus-Infotech9
how the size of an integer is decided? - is it based on processor or compiler or OS? nvidia16
Find Error if any in below code, Justify ur answer: struct xx { int a; struct yy { char c; struct xx* p; } struct yy* q; } NDS3
Difference between Class and Struct. Motorola6
Program to display given 3 integers in ascending order N-Tech1
how can i make a program with this kind of output.. Enter a number: 5 0 01 012 0123 01234 012345 01234 0123 012 01 0 Wipro4
 
For more C Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com