Horje
bool print variable in c Code Example
print bool c
// there is no way of pretty-print a boolean with printf
printf("%i", true);  // will print 1
printf("%i", false); // will print 0

// but we can create a macro
#define formatBool(b) ((b) ? "true" : "false")
printf("%s", formatBool(true));  // will print true
printf("%s", formatBool(false)); // will print false
bool print variable in c
#include <stdio.h>
#include <stdbool.h>
int main(){
  int o = true;
  printf("%i", o);
  /*
  Output
  1
  1 means true
  */
  int q = false;
  printf("%i", q);
  /*
  Output
  0
  0 means false
  */
}




C

Related
linux_reboot_magic2 Code Example linux_reboot_magic2 Code Example
california Code Example california Code Example
type conversion Code Example type conversion Code Example
virtualbox how to move vmdk to another folder Code Example virtualbox how to move vmdk to another folder Code Example
youtube code Code Example youtube code Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7