Write a C program to add two numbers before the main function
is called.
Answers were Sorted based on User's Feedback
Answer / jhansi rani attuluri
#include<stdio.h>
int sum(int a,int b);
int sum(int a,int b)
{
return a+b;
}
main()
{
int a,b,c;
printf("enter the value for a,b:");
scanf("%d %d",&a,&b);
printf("sum is %d\n",sum(a,b));
}
Is This Answer Correct ? | 19 Yes | 45 No |
how can u draw a rectangle in C
53 Answers Accenture, CO, Codeblocks, Cognizant, HCL, Oracle, Punjab National Bank, SAP Labs, TCS, University, Wipro,
#include<stdio.h> main() { int a[2][2][2] = { {10,2,3,4}, {5,6,7,8} }; int *p,*q; p=&a[2][2][2]; *q=***a; printf("%d----%d",*p,*q); }
Write a routine that prints out a 2-D array in spiral order
Print an integer using only putchar. Try doing it without using extra storage.
How can i find first 5 natural Numbers without using any loop in c language????????
what is variable length argument list?
main(int argc, char **argv) { printf("enter the character"); getchar(); sum(argv[1],argv[2]); } sum(num1,num2) int num1,num2; { return num1+num2; }
main() { int i=0; while(+(+i--)!=0) i-=i++; printf("%d",i); }
9 Answers CSC, GoDB Tech, IBM,
main() { int c = 5; printf("%d", main||c); } a. 1 b. 5 c. 0 d. none of the above
#include <stdio.h> #define a 10 main() { #define a 50 printf("%d",a); }
main() { int i, j; scanf("%d %d"+scanf("%d %d", &i, &j)); printf("%d %d", i, j); } a. Runtime error. b. 0, 0 c. Compile error d. the first two values entered by the user
Find your day from your DOB?
15 Answers Accenture, Microsoft,