w3resource

C Snippets, Examples, Code

C Snippets [13]

1. How to get the length of an array in C?

2. Difference between const int*, const int * const, and int const * in C?

3. Pre Increment Operators.

4. Boolean values in C language.

5. What is size_t in C?.

6. What is a static variable in C?

7. How do you print a boolean in C?

8. Generate random integers in C.

9. How to list all files, sub-directories in a directory using C?

10. What is the efficient way to define the main() function in C?

11. What is the present C language standard?

12. Find the Size of int, float, double, char, pointers and structure?

13. What is the difference between float and double in C?

More to Come !



Follow us on Facebook and Twitter for latest update.

C Programming: Tips of the Day

C Programming - How to initialize a struct in accordance with C programming language standards?

In (ANSI) C99, you can use a designated initializer to initialize a structure:

MY_TYPE a = { .flag = true, .value = 123, .stuff = 0.456 };

Ref : https://bit.ly/3cgvor0