Logo 
Search:

C Programming FAQ

Submit Interview FAQ
Home » Interview FAQ » C ProgrammingRSS Feeds

C programming practical question 79

  Shared By: Adah Miller    Date: Jan 24    Category: C Programming    Views: 79

Answer:

main(int argc, char **argv)
{
printf("enter the character");
getchar();
sum(argv[1],argv[2]);
}
sum(num1,num2)
int num1,num2;
{
return num1+num2;
}


Answer:
Compiler error.


Explanation:
argv[1] & argv[2] are strings. They are passed to the function sum without converting it to integer values.

Share: 
 

Didn't find what you were looking for? Find more on C programming practical question 79 Or get search suggestion and latest updates.


Your Comment
  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].


Tagged: