Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

#include <stdio.h>

int main ( int argc, char* argv [ ] )
{
int value1 = 10;
int value2 = 5;
printf ( "\n The sum is :%d", value1 | value2 );

}
This is the answer asked by some one to add two numbers
with out using arithmetic operator?Yes this answer is write
it given out put as 15.But how?????
what is need of following line?
int main ( int argc, char* argv [ ] )
how it work?what is the meaning for this line?
please explain me.Advance thanks

Answer Posted / sivakumar

the argc and argv are mentioned in the main as arguments
those are used for the purpose of command line statements.
if we mentioned the main like (argc,argb[]),then that
program can work as command line program. like dos
functions(type,copy....).
Then at that time argc contains count of parameters and argv
contains list of arguments.
eg:-
show_sum 10 20 30
then argc contain value 3 and argv containe list{10,20,30).
ok.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a program for finding factorial of a number.

1089


What are c preprocessors?

1201


Define circular linked list.

1036


Why doesnt the call scanf work?

1196


PROGRAM TO WRITE CONTENTS OF 1 FILE IN REVERSE TO ANOTHER FILE,PROGRAM TO COPY 1 FILE TO ANOTHER BY SPECIFYING FILE NAMES AS COMMAND LINE

2026


What is default value of global variable in c?

994


What are the disadvantages of external storage class?

1062


A routine usually part of the operation system that loads a program into memory prior to execution a) linker b) loader c) preprocessor d) compiler

1103


Is boolean a datatype in c?

1070


Find MAXIMUM of three distinct integers using a single C statement

1071


What is the newline escape sequence?

1078


What are the types of pointers in c?

1029


What does return 1 means in c?

1073


What is derived datatype in c?

1099


What is the difference between mpi and openmp?

1302