How to use strtoull to convert a string to an unsigned long long in C

1 Answer

0 votes
#include <stdio.h>
#include <stdlib.h>

int main() {
	char s[] = "1903837276521308982";

	unsigned long long ull = strtoull(s, NULL, 10);

	printf("%llu", ull);

	char ch = getchar();

	return 0;
}



/*
run:

1903837276521308982

*/

 



answered Apr 10, 2022 by avibootz

Related questions

1 answer 223 views
1 answer 75 views
1 answer 218 views
218 views asked Aug 10, 2019 by avibootz
1 answer 93 views
1 answer 174 views
...