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 is the ANSI C Standard?

752


Is main is a keyword in c?

579


Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?

595


What does *p++ do?

558


How can you tell whether a program was compiled using c versus c++?

601






program to convert a integer to string in c language'

1957


how can i access hard disk address(physical address)? are we access hard disk by using far,near or huge pointer? if yes then please explain.....

1346


What is gets() function?

644


What is a function simple definition?

583


hi send me sample aptitude papers of cts?

1632


What is the meaning of && in c?

527


Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.

574


i have a written test for microland please give me test pattern

2149


What does it mean when the linker says that _end is undefined?

600


How can I open a file so that other programs can update it at the same time?

629