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 / susie
Answer :
Compiler error.
Explanation:
argv[1] & argv[2] are strings. They are passed to the
function sum without converting it to integer values.
Is This Answer Correct ? | 5 Yes | 1 No |
main() { char *p = "hello world"; p[0] = 'H'; printf("%s", p); } a. Runtime error. b. “Hello world” c. Compile error d. “hello world”
main() { char a[4]="HELLO"; printf("%s",a); }
#include<stdio.h> main() { char s[]={'a','b','c','\n','c','\0'}; char *p,*str,*str1; p=&s[3]; str=p; str1=s; printf("%d",++*p + ++*str1-32); }
main() { static int var = 5; printf("%d ",var--); if(var) main(); }
Under linux environment can u please provide a c code for computing sum of series 1-2+3-4+5......n terms and -1+2-3+4-5...n terms..
pls anyone can help me to write a code to print the values in words for any value.Example:1034 to print as "one thousand and thirty four only"
What is "far" and "near" pointers in "c"...?
How can you relate the function with the structure? Explain with an appropriate example.
find A^B using Recursive function
#define prod(a,b) a*b main() { int x=3,y=4; printf("%d",prod(x+2,y-1)); }
Write a Program that Inputs 10 Numbers in an Array and Show the Maximum Number
Hi, i have a project that the teacher want a pyramid of numbers in C# or java...when we click a button...the pyramid should be generated in a listbox/or JtextArea...and the pyramid should have the folowing form: 1 232 34543 4567654 567898765 67890109876 7890123210987 890123454321098 90123456765432109 0123456789876543210 Plz help with codes...didn't find anything on the net.