[SOLVED] Program output different on two machines

About programming and getting involved with Linux Mint development
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Locked
MikeK
Level 1
Level 1
Posts: 36
Joined: Fri Jul 07, 2023 10:35 am

[SOLVED] Program output different on two machines

Post by MikeK »

I have a simple C program on two machines. One desktop, one laptop...both running Mint21 and the same version of gcc. But when I compile and run the program I get different output (a file) on each machine. The output files have the same number of bytes, but display differently. I wonder if one of the machine is missing a language pack or something like that? How can I figure this out and get them to behave identically?

Attached is a screenshot showing both files in Notepad++ (yes, from my Win10 machine, but that isn't the problem).
Untitled2.png

EDIT: I did more investigating. This is the first record from each machine.
firstrec.PNG
Last edited by LockBot on Mon Feb 05, 2024 11:00 pm, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
MikeK
Level 1
Level 1
Posts: 36
Joined: Fri Jul 07, 2023 10:35 am

Re: Program output different on two machines

Post by MikeK »

Somebody on another forum showed me the problem. I was writing strings to a file without first clearing the strings with memset().
Locked

Return to “Programming & Development”