For a school project I am doing we are required to take character input through the command line and convert the character to its ascii value. I would think, therefore, that the line of code:
printf("%d",(int)argv[1]);
would print out 97(ascii for a) if i were to type 'a' as the first command parameter. However, my program is printing out 109, the ascii code for 'm'. Why is this happenning??
neclark2 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.