Questions tagged [unsigned-integer-overflow]

Filter by
Sorted by
Tagged with
0
votes
1answer
128 views

cash CS50 2020 pset1 modulo

I seem to be having trouble using modulo as conditions inside of while loops. int main() { float n; do { n = get_float("How much change is owed? "); } while(n < 0); int cents = round(...
0
votes
1answer
62 views

Vigenere error compiling: type int vs unsigned long

I keep getting this error when trying to compile my vigenere code: error: format specifies type 'int' but the argument has type 'unsigned long' [-Werror,-Wformat] printf("%c", (((plain[j] - 'A' + 1) ...
0
votes
1answer
310 views

Error in my pset4 resize.c code

I have written this resize.c code it compiles but gives following error when run: runtime error: unsigned integer overflow: 18446744073709551613 * 3 cannot be represented in type 'unsigned long' ...
0
votes
1answer
670 views

getting runtime error: unsigned integer overflow

#include <stdio.h> #include <stdlib.h> #include "bmp.h" int main(int argc, char* argv[]) { // ensure proper usage if (argc != 4) { printf("Usage: ./copy n infile ...