Category Archives: C language (en)

[C language] Programming Exercises: Loops and Arrays (Chapter 6)

The long-awaited moment has come to do “homework” on the sixth chapter of Stephen Prata’s book “C Primer Plus”. We are waiting for as many as 18 exciting tasks. 1. Write a program that creates an array of 26 elements … Continue reading

Posted in C language (en) | Leave a comment

[C language] Mysterious scanf and %c: enter a phrase, not a character

I want to share a separate post with a very non-trivial task from the point of view of a beginner in C. It is the eighth self-monitoring question in chapter 6 of Stephen Prat’s C Primer Plus. The task is: … Continue reading

Posted in C language (en) | Leave a comment

[C language] Control Statements: Loops (Chapter 6)

Synopsis: The sixth chapter in Stephen Prata’s C Primer Plus. Loop with precondition: for (initialization; examination; update)           operator Initializing expression → test expression → corrective expression Loop with postcondition: do     operator while (expression) … Continue reading

Posted in C language (en) | Leave a comment

Compiling in “Notepad++”

I got a little carried away using Borland 6 to learn C. Powerful program and all, but due to my age, the UI customization capabilities are at the level of a notebook (the same one). For example, you cannot change … Continue reading

Posted in C language (en), IDE (en), Notepad++ (en) | Leave a comment

[C language] Program about grains on a chessboard (Chapter 5)

From the fifth chapter of Stephen Prata’s book “C Primer Plus” – a program based on a well-known proverb that illustrates exponential growth. Background: The king offered to choose a reward for the hero’s service; the hero asked to put … Continue reading

Posted in C language (en) | Leave a comment

[C language] Operations, Expressions, and Operators (Chapter 5)

The fifth chapter in Stephen Prata’s C Primer Plus. It deals with statements and the while loop. Curiously, in Prat’s book, while comes before if/else in terms of presentation; while in programming, loops are often taught already after conditional statements. … Continue reading

Posted in C language (en) | Leave a comment

[C Language] Character Strings and Formatted I/O (Chapter 4)

The fourth chapter in Stephen Prat’s C Primer Plus. Programming exercises and their solutions: 1. Write a program that asks for the first and last name and then outputs them in the format last name, first name.

Posted in C language (en) | Leave a comment

[C language] Data in C (Chapter 3)

The third chapter in Stephen Prata’s C Primer Plus. Programming exercises and their solutions: 1. Experiment with how your system handles integer and floating point overflows and floating point underflows; those. write a program that has such problems. (See the … Continue reading

Posted in C language (en) | Leave a comment

[C language] Introduction to C language (Chapter 2)

The second chapter in Stephen Prata’s C Primer Plus. Here the first practical tasks already appear; albeit extremely simple, for memorizing the basic syntax; therefore, I will not give their output separately. Before the tasks, a small reminder: 5 Types … Continue reading

Posted in C language (en) | Leave a comment

[C language ] Background (Chapter 1)

So, the first chapter in Stephen Prata’s book “C Primer Plus”. Since there are no exercises in it (only one, theoretical), I will give a small summary of the chapter for the purpose of familiarization: The advent of the C … Continue reading

Posted in C language (en) | Leave a comment

[C language] Introduction: Programming Exercises

I’m taking lessons from Stephen Prata’s book “C Primer Plus”. I have a book from 2000, which is very relevant to me, since the project I plan to work on adheres to the ANSI C standard. But in the process … Continue reading

Posted in C language (en) | Leave a comment

C language: implicit type conversion example

One of the most hardcore stuff in C language is implicit type conversion. If you don’t watch for it – you will be in big trouble. Take a look at this code: #include <stdio.h> int main (void) { int a … Continue reading

Posted in C language (en) | Leave a comment