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 |
What are predefined functions in c?
What is a structure and why it is used?
What is the -> in c?
Explain how do you generate random numbers in c?
Explain how are 16- and 32-bit numbers stored?
How to reverse a string using a recursive function, with swapping?
What is an volatile variable?
hOW Can I add character in to pointer array of characters char *a="indian"; ie I want to add google after indian in the char *a
there is two conditions , 1. while using for loop for printing 1 to 50 no's simulteneous 2. while using printf functios for printing 1 to 50 no's simulteneous with or without using variables who will take more time for compiling and execution? explain in details with reason?
what is the code for getting the output as * ** ***
What are the types of functions in c?
to find the program of matrix multiplication using arrays