c program to subtract between two numbers without using '-'
sign and subtract function.
Answers were Sorted based on User's Feedback
Answer / davic uwihoreye
Write a c program or code to subtract two numbers without
using subtraction operator
#include<stdio.h>
int main(){
int a,b;
int sum;
printf("Enter any two integers: ");
scanf("%d%d",&a,&b);
sum = a + ~b + 1;
printf("Difference of two integers: %d",sum);
return 0;
}
Sample Output:
Enter any two integers: 5 4
Difference of two integers: 1
Is This Answer Correct ? | 9 Yes | 1 No |
write a c program that if the given number is prime, and their rearrangement(permute) of that number is also prime. Ex: Input is "197" is prime Output: 791,917,179 is also prime. Please any one tell me tha code for that
How do you initialize function pointers? Give an example?
YBJBU6
Explain the concept and use of type void.
ASCII stands for
print out of string in this format; 1. "rajesh" 2. \n 3. %d
What is the difference between specifying a constant variable like with constant keyword and #define it? i.e what is the difference between CONSTANT FLOAT A=1.25 and #define A 1.25
Can we increase size of array in c?
How can I invoke another program from within a C program?
How can I display a percentage-done indication that updates itself in place, or show one of those twirling baton progress indicators?
about c language
When can a far pointer be used?