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 235 views
1 answer 83 views
1 answer 226 views
226 views asked Aug 10, 2019 by avibootz
1 answer 99 views
1 answer 182 views
...