3 votes
Accepted

Cs50 problem set 2 Initials

There are a few errors in your code that mess up your output. printf("%c",toupper(n[0])); has a serious error. This works for Robert Thompson but not if there was a space before Robert. It would ...
user avatar
2 votes

CS50 vigenere.c works for lower but not upper case letters

There are a couple of problems. The main one is that your code doesn't handle the case where the plain text and the key characters are not the same case. It assumes that if the plain text is lower ...
user avatar
  • 63.1k
1 vote
Accepted

Caesar 50 , no output!

I suggest that you put a printf("%i",ci); instruction before you call your function here ci = original_index(ci); to check the value of your char variable 'ci'. With the value in mind, think what the ...
user avatar
  • 1,541
1 vote
Accepted

Why string variable has no square bracket?

The reason why a string variable does not have brackets, is because it is not a string array. (It is a char array or a char pointer.) In fact, string is a new type, defined in the cs50 library. It ...
user avatar
1 vote
Accepted

Limits of data type as explained in Week-1

The problem is how numbers are stored. A computer operates with a binary or base-2 number system. The real world operates in a base-10 system. The only fractional numbers that can be stored with ...
user avatar
  • 63.1k

Only top scored, non community-wiki answers of a minimum length are eligible