60,706 Result(s)
-
Chapter
Exercises
Write a program that defines a function of type void called printMessage(). The function outputs a simple message on the standard output. Call the user-defined function from the main function: ...
-
Chapter
Time and Date
The <time.h> header declares functions that allow us to work with date-time. This chapter explains how to obtain and format the current time and date.
-
Chapter
The List of Debugging Patterns
This chapter lists debugging pattern names to facilitate easy recall.
-
Chapter
Unions
A union is a user-defined type whose members overlap in memory. Unlike a structure whose members occupy separate regions of memory, the union’s members all occupy the same memory region. The size of the union ...
-
Chapter
Enumerations
Enumerations are types whose values are symbolic names. These names have underlying integral values. To declare an enumeration type, we use the following syntax: enum MyEnumName { S...
-
Chapter
Typedef
The typedef declaration creates a synonym for the existing type. We use the typedef to create an alias name for the existing type name. The usage is of the following syntax: typedef...
-
Chapter
Final Words
Artificial intelligence is a fascinating topic, but it’s the tip of an iceberg that has a lot hidden that does not meet the eye. In this book, we tried to go deeper to understand the concept from its roots. As...
-
Chapter
Exercises
Write a program that defines, uses, and then undefines a macro. The macro names and their contents are arbitrary: #include <stdio.h> // define the macro ...
-
Chapter
Conclusion
As we near the conclusion of this comprehensive exploration of the complexities associated with the implementation of Microsoft Dynamics 365 Business Central, it is imperative to pause and contemplate the terr...
-
Chapter
Exercises
Write a program that accepts two variables of type int and double from the standard input. Use the fgets function to store the input into a buffer. Use the sscanf function to extract the buffer into variables: ...
-
Chapter
The C17 Standard
At the time of writing, the C17 standard, officially named ISO/IEC 9899:2018, is the last published C standard. It replaces the C11 standard, does not introduce new features, and fixes defects reported for C11. T...
-
Chapter
Afterword
Being able to build dashboards to support your colleagues or students is an extremely empowering capability. With a good design, you can present data and analysis tools to them to make their work as effortless...
-
Chapter
Do Not Use the gets Function
The gets function is declared inside the <stdio.h> header, reads the input into a character array pointed to by str, and has the following syntax: char *gets (char* str); ...
-
Chapter
Do Not Cast the Result of malloc
In C, we do not need to cast the result of malloc. The following example wrongly performs the cast: #include <stdio.h> #include <stdlib.h> ...
-
Chapter
Do Not Read Out of Bounds
Trying to access an array element that is not there invokes undefined behavior. We say we are reading out of bounds. The following example demonstrates a common scenario of trying to access a nonexistent, out-of-...
-
Chapter
Cast a Pointer to void* When Printing Through printf
When printing out a pointer’s value (the memory address it points to) using a printf function and a %p format specifier, we need to cast that pointer to type void* first. Simply trying to print out the pointer va...
-
Chapter
Create a Project in Flutter and Add Flame
In this chapter, we are going to learn how to create a Flutter project and add the necessary base library to develop our 2D games using Flutter; therefore, it is a chapter that you should refer to every time w...
-
Chapter
Command-Line Arguments
There is another main function signature that allows us to work with the command-line arguments. These are arguments we can pass to our executable file in the command line. Example: ...
-
Chapter
static Global Names
When we define a variable or a function inside the file/global scope, they have external linkage by default. They can be referred to from other .c files/translation units. The static keyword in front of variables...
-
Chapter
Linkage
When we compile our source code, the compiler stitches a header and the source file’s content to create a single source file called a translation unit. The translation unit is then used to produce an object file....