Abstract
Write a program that initializes two int numbers. Declare a third int variable that represents the sum of the previous two integers. Print out the result:
#include <stdio.h> int main(void) { int x = 123; int y = 456; int z = x + y; printf("The result is: %d\n", z); }
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2021 Slobodan Dmitrović
About this chapter
Cite this chapter
Dmitrović, S. (2021). Exercises. In: Modern C for Absolute Beginners. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-6643-4_8
Download citation
DOI: https://doi.org/10.1007/978-1-4842-6643-4_8
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-6642-7
Online ISBN: 978-1-4842-6643-4
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)