MCPcopy Create free account
hub / github.com/CodeWithHarry/The-Ultimate-C-Programming-Course / main

Function main

Chapter 3/04_logical.c:3–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1#include <stdio.h>
2
3int main(){
4 int a=1; int b=1;
5 printf("The value of a and b is %d\n", a&&b);
6 printf("The value of a or b is %d\n", a||b);
7 printf("The value of not(a) is %d\n", !a);
8
9 if(a && b){
10 printf("both are true\n");
11 }
12 // is same as writing ....
13 if(a){
14 if(b){
15 printf("both are true");
16 }
17 }
18 return 0;
19}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected