Write a program in C for showing working of different
logical operator in C.
Your program should guide users with proper message/menu on
the console.
Answer Posted / rajiv
int a,b,c,d,m,t;
float x,y,j,k;
scanf("%d\n%d\n%d\n%d\n%d\n%d\n",&a,&b,&c,&d,&m,&t);
scanf("%f\n%f\n%f\n%f\n",&x,&y,&j,&k);
if((a>b && c<d)||(x>y && j<k)||(m!=t))
printf("its demo of logical operator");
else
printf("logical error is there in program");
Is This Answer Correct ? | 42 Yes | 16 No |
Post New Answer View All Answers
What does p mean in physics?
Is c object oriented?
What is static and volatile in c?
Why header file is used in c?
What is the purpose of the statement: strcat (S2, S1)?
Do you know pointer in c?
In the DOS enveronment, normal RAM that resides beyond the 1mb mark. a) expanded memory b) swapped memory c) Extended memory d) none
What is the difference between abs() and fabs() functions?
Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.
Can a program have two main functions?
What is volatile variable how do you declare it?
What is the use of extern in c?
What is structure packing in c?
What are loops c?
Can you please compare array with pointer?