Answer Posted / sathish kumar .k
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,i;
int sum=0;
clrscr();
printf("Enter Two Nos");
scanf("%d%d",&a,&b);
for(i=0;i<a;i++)
sum=sum+1;
for(i=0;i<b;i++)
sum=sum+1;
printf("Sum:%d",sum);
getch();
}
| Is This Answer Correct ? | 18 Yes | 26 No |
Post New Answer View All Answers
Explain how can a program be made to print the line number where an error occurs?
Where can I get an ansi-compatible lint?
What is a #include preprocessor?
What does node * mean?
What are the advantages of using new operator as compared to the function malloc ()?
You have given 2 array. You need to find whether they will
create the same BST or not.
For example:
Array1:10 5 20 15 30
Array2:10 20 15 30 5
Result: True
Array1:10 5 20 15 30
Array2:10 15 20 30 5
Result: False
One Approach is Pretty Clear by creating BST O(nlogn) then
checking two tree for identical O(N) overall O(nlogn) ..we
need there exist O(N) Time & O(1) Space also without extra
space .Algorithm ??
DevoCoder
guest
Posted 3 months ago #
#define true 1
#define false 0
int check(int a1[],int a2[],int n1,int n2)
{
int i;
//n1 size of array a1[] and n2 size of a2[]
if(n1!=n2) return false;
//n1 and n2 must be same
for(i=0;i
What is meant by keywords in c?
What is string function c?
what is the difference between north western polytechnique university and your applied colleges?? please give ur answers for this. :)
What is 2 d array in c?
What is the 'named constructor idiom'?
Program to find the sum of digits of a given number until the sum becomes a single digit. (e.g. 12345=>1+2+3+4+5=15=>1+5=6)
Why doesn't C support function overloading?
Where are local variables stored in c?
Are local variables initialized to zero by default in c?