List of ASCII Codes

ASCII CODES I’ve searched all over the internet looking for a list like this of  these codes (ASCII codes), but couldn’t find them anywhere. Now, I’ve made a list of them myself as I found them out. Remember that in different programs, different characters may or may not appear. For example, in notepad, the ← appears to be a –…

Tower of Hanoi in C

What is Tower of Hanoi? All must be well aware of the problem of Tower of Hanoi, for those who don’t know, let’s discuss it once again. The Tower of Hanoi (also called the Tower of Brahma or Lucas’ Tower, and sometimes pluralized) is a mathematical game or puzzle. tower of hanoi   It consists of three rods, and a…

C MCQs: Error Handling- Part 2

Here is a listing of C MCQs: Error Handling along with answers, explanations and/or solutions: 1. Which of the following causes an error? a) Trying to read a file that doesn’t exist b) Inability to write data in a file c) Failure to allocate memory with the help of malloc d) All of the mentioned 2. What is the purpose…

C MCQs: Error Handling- Part 1

Here is a listing of C multiple choice questions on “Error Handling” along with answers, explanations and/or solutions: 1. What is the output of this C code if there is no error in stream fp? #include <stdio.h> int main() { FILE *fp; fp = fopen(“newfile”, “w”); printf(“%d\n”, ferror(fp)); return 0; } a) Compilation error b) 0 c) 1 d) Any…