Answer Posted / anandi
#include<stdio.h>
#include<conio.h>
void main()
{
int add(int,int);
int a,b;
clrscr();
printf("Enter two numbers: ");
scanf("%d %d",&a,&b);
printf("The Sum is: %d",add(a,b));
getch();
}
int add(int x,int y)
{
return(x+y);
}
| Is This Answer Correct ? | 42 Yes | 14 No |
Post New Answer View All Answers
A variable that is defined in a specified portion of a program but can be used throughout the program a) global variable b) local variable c) character d) none
What is the difference between array and pointer?
What is memory leak in c?
a sequence of bytes with one to one corrspondence to those in the external device a) sequential addressing b) address c) byte code d) none
Write a program to replace n bits from the position p of the bit representation of an inputted character x with the one's complement. Method invertBit takes 3 parameters x as input character, p as position and n as the number of positions from p. Replace n bits from pth position in 8 bit character x. Then return the characters by inverting the bits.
What is the size of enum in c?
Write a program to implement queue.
What is #pragma statements?
Explain which function in c can be used to append a string to another string?
Can static variables be declared in a header file?
What are the scope of static variables?
exit () is used to a) exit () terminates the execution of the program itself b) exit () terminates the execution of the loop c) exit () terminates the execution of the block d) none of the above
What are header files and what are its uses in C programming?
How do I round numbers?
What are the 4 types of unions?