implement NAND gate logic in C code without using any
bitwise operatior.
Answer Posted / vadivel t
int a, b;
scanf("%d %d", &a, &b);
if(a != 0 || b != 0)
{
printf("1");
}
else
{
printf("0");
}
| Is This Answer Correct ? | 28 Yes | 20 No |
Post New Answer View All Answers
Why does everyone say not to use scanf? What should I use instead?
Explain the advantages and disadvantages of macros.
i got 75% in all semester am i eligible for your company
Given below are three different ways to print the character for ASCII code 88. Which is the correct way1) char c = 88; cout << c << " ";2) cout.put(88);3) cout << char(88) << " "; a) 1 b) 2 c) 3 d) constant
How does #define work?
What is function prototype?
How do you define CONSTANT in C?
I just typed in this program, and it is acting strangely. Can you see anything wrong with it?
What is void pointers in c?
Explain what is the benefit of using an enum rather than a #define constant?
How can I trap or ignore keyboard interrupts like control-c?
Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?
What does sizeof return c?
about c language
Lists the benefits of c programming language?