implement NAND gate logic in C code without using any
bitwise operatior.
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / senthil.cp
NAND using Bitwise operators
c = ~(a & b) OR
c = ~a | ~b
NAND without using bitwise operators
c = (0xFF - a) + (0xFF - b)
| Is This Answer Correct ? | 35 Yes | 16 No |
int main() { int *p=new int; *p=10; del p; cout<<*p; *p= 60; cout<<*p; } what will be the output & why?
who developed c and why he developed c?
What is the difference b/w Structure & Union?
a 'c' program to tell that the set of three coordinates lie on a same line
why TCS selected more student in the software field from all institution.
Explain the differences between public, protected, private and internal.
any C program contains only one function, it must be a) void () b) main () c) message () d) abc ()
How can I check whether a file exists? I want to warn the user if a requested input file is missing.
What is the meaning of typedef struct in c?
hi how to convert program from notepad to turboc editor can u please help me
What is the difference between malloc() and realloc()?
WHAT IS C?