how to write a program which adds two numbers without using
semicolon in c

Answers were Sorted based on User's Feedback



how to write a program which adds two numbers without using semicolon in c..

Answer / g.rajitha

void main()
{
int a,b;
if(printf("Enter two numbers"))
if(scanf("%d %d",&a,&b))
if(printf("%d",(a+b)))
}

Is This Answer Correct ?    1 Yes 10 No

how to write a program which adds two numbers without using semicolon in c..

Answer / g.rajitha

#include<iostream.h>
void main()
{
int a,b;
if(cout<<"Please enter two numbers : ")
if(cin>>a>>b)
if(cout<<"Sum = "<<(a+b))
}

Is This Answer Correct ?    5 Yes 16 No

Post New Answer

More C Interview Questions

What will the code below print when it is executed?   int x = 3, y = 4;         if (x = 4)                 y = 5;         else                 y = 2;         printf ("x=%d, y=%d ",x,y);

0 Answers  


A.C func() { pritnf(" in fuction %d",MACRO); } MAIN.c testfunc() { #define MACRO 10 printf("in test function %d", MACRO); } main() { printf("in main %d",MACRO); func(); testfunc(); getch(); }

2 Answers   Wipro,


Sir i need notes for structure,functions,pointers in c language can you help me please

0 Answers   TCS,


write a program to reverse the words in the sentence.NOTE:not reverse the entire string but just the occurance of each word

1 Answers   Sienna Ecad, Wipro,


what is the other ways to find a logic to print whether a number is an even or odd wit out using % symbol??????? i know three different ways to print it. so i need any other different logic>>>>>

5 Answers   TCS,


Explain what is the benefit of using an enum rather than a #define constant?

0 Answers  


why arguments can generally be passed to functions a) sending the values of the arguments b) sending the addresses of the arguments c) a & b d) none of the above

0 Answers  


What are the Advantages of using macro

0 Answers  


How to declare a variable?

0 Answers  


When I tried to go into a security sites I am denied access and a message appeared saying 'applet not initialize'. How can I rectify this problem.

0 Answers   HCL,


What is the value of a[3] if integer a[] = {5,4,3,2,1}?

0 Answers  


Explain the use of 'auto' keyword in c programming?

0 Answers  


Categories