implement NAND gate logic in C code without using any
bitwise operatior.

Answer Posted / laxmi bose

#include<stdio.h>
main()
{
int a,b;
scanf("%d%d",&a,&b);
if(a==0||b==0)
{
printf("1");
}
else
{
printf("0");
}

Is This Answer Correct ?    42 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the function of multilevel pointer in c?

835


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.....

1580


What is #define in c?

812


How will you declare an array of three function pointers where each function receives two ints and returns a float?

1060


What is union and structure in c?

852


Why do we use namespace feature?

816


Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.

852


Can you subtract pointers from each other? Why would you?

744


How many levels of pointers have?

793


Why static variable is used in c?

759


How are pointers declared in c?

789


What is data structure in c and its types?

805


What are global variables?

861


What is a structural principle?

834


What is an expression?

836