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 |
Which function in C can be used to append a string to another string?
What do you mean by scope of a variable in c?
Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result
i want to know aptitude questions,technical questions
What functions are used for dynamic memory allocation in c language?
what are the advantage and disadvantage of recursion
2. What does static variable mean?
what is the basis for selection of arrays or pointers as data structure in a program
hi send me sample aptitude papers of cts?
When should the volatile modifier be used?
how can make variable not in registers
Find MAXIMUM of three distinct integers using a single C statement