w3resource

C Snippets, Examples, Code

C Snippets [46]

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?

14. Printing leading 0's in C.

15. Implementing a custom printf() function in C.

16. Example of C custom strcmp() function.

17. Difference between char * const and const char *?

18. What is the difference between char a[] and char *a?

19. How to convert a character to an integer, float in C ?

20. Implementing a custom memcpy() function.

21. Implementing a custom atoi() function.

22. C program to define Macro to find maximum/minimum of two numbers.

23. C program to find the size of a structure and why does the structure's area differ from each member's?

24. What is the difference between char array and char pointer in C language with example?

25. How do function pointers work in C?

26. How to pass a function as a parameter in C?

27. Difference between typedef struct and struct definitions with example?

28. Implementing a custom strlen() function.

29. Implementing a custom abs() function.

30. Understanding the use of the '-->' Symbol in C.

31. Understanding the difference between #include <filename> and #include "filename" in C.

32. Understanding the ??!??! Sequence in C.

33. Is > Faster than >= in C? Understanding comparison operators.

34. How to initialize all elements of an array to the same value in C?

35. Understanding the difference between Declaration and Definition in C.

36. Understanding the difference between malloc and calloc in C.

37. What Should main() Return in C? Understanding Return Values.

38. How to divide numbers in C without using *, /, +, -, or % operators.

39. Understanding static const, #define, and enum in C.

40. What is a "static" Function in C? Scope, Usage, and Examples.

41. How to Initialize a Struct in C: Examples and Best Practices.

42. Conversion Specifier for Printing long in C with printf.

43. Print Binary format in C using printf alternatives.

44. Difference Between char s[] and char *s in C Programming.

45. Difference Between unsigned int and size_t in C Programming.

46. What is an unsigned char in C Programming?

More to Come !



Become a Patron!

Follow us on Facebook and Twitter for latest update.

It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.

https://www.w3resource.com/c-programming-exercises/c-snippets/index.php