Answers for "integer in c"

C
5

what is a long long int in c

#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>

#define FailedToEducate    101
#define Success            400

int main(void) {
	/* 
    	A long int is:
        	32-bit compiler: 
            	MIN: -2,147,483,648
            	MAX: 2,147,483,647
                unsigned MAX: 4,294,967,295
            64-bit compiler: 
            	MIN: -9,223,372,036,854,775,808
            	MAX: 9,223,372,036,854,775,807
                unsigned MAX: 18,446,744,073,709,551,615
        Therefore...a long int will either be
        -2,147,483,648 and 2,147,483,647 for a 32-bit compiler
        or -9,223,372,036,854,775,808 and 
        9,223,372,036,854,775,807 for a 64-bit compiler, 
        whilst a long long int will just be 
        -9,223,372,036,854,775,808 and 
        9,223,372,036,854,775,807
        
        I hope this made sense!
    */
  
  	bool userUnderstands=true;
  
  	if(userUnderstands) {
    	exit(Success);
    } else {
    	exit(FailedToEducate);
    }
}
Posted by: Guest on April-24-2020
0

declare integer c

int a = value;
Posted by: Guest on June-19-2020
0

how to create an int in c

int nameOfInt;
Posted by: Guest on December-24-2020
0

number in c

#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>

int main()
{
	int a, b;
    float c, d;
    scanf("%i %i", &a, &b);
    scanf("%f %f", &c, &d);
    int sum1 = a + b;
    int sum2 = a - b;
    float sum3 = c + d;
    float sum4 = c - d;
    printf("%i %i\n", sum1, sum2);
    printf("%.1f %.1f", sum3, sum4);
    return 0;
}
Posted by: Guest on April-25-2021

Code answers related to "C"

Browse Popular Code Answers by Language