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


Please Help Members By Posting Answers For Below Questions

What does p mean in physics?

583


Is c object oriented?

541


What is static and volatile in c?

780


Why header file is used in c?

577


What is the purpose of the statement: strcat (S2, S1)?

642






Do you know pointer in c?

591


In the DOS enveronment, normal RAM that resides beyond the 1mb mark. a) expanded memory b) swapped memory c) Extended memory d) none

720


What is the difference between abs() and fabs() functions?

607


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.

1570


Can a program have two main functions?

572


What is volatile variable how do you declare it?

566


What is the use of extern in c?

647


What is structure packing in c?

608


What are loops c?

616


Can you please compare array with pointer?

617