Part 2 : C programming FAQs

C Basics-Level 1 - Syntax

  1. What are the basic data types

  2. What are storage class specifiers

  3. What are modifiers

  4. What are Qualifiers

  5. Explain different categories of operators in C

  6. Explain order of evaluation of operators in C

  7. Explain rules of defining an identifier in C

  8. Explain rules of defining functions in C

  9. Explain rules of writing “for” loops in C

  10. Explain rules of writing “while” loops and “do {} while” loops in C

  11. Explain rules of writing “switch” cases in C

  12. Explain rules of writing “if” conditions in C

  13. Explain rules of writing “if else” conditions in C

  14. Explain rules of defining structures in C

  15. Explain rules of defining unions in C

  16. Explain rules of defining Macro functions in C

  17. Explain rules of defining inline functions in C

  18. Explain rules of defining a static function in C

  19. Explain rules of defining a reentrant function in C

  20. Explain rules of defining an integer array

  21. Explain rules of defining a float array

  22. Explain rules of defining a character array

  23. Explain rules of defining a double array

  24. Explain rules of defining structure arrays

  25. Explain rules of defining union arrays

  26. Explain rules of defining enums

  27. Explain rules of defiing array of strings

  28. Explain rules of defining an integer pointer

  29. Explain rules of defining a float pointer

  30. Explain rules of defining a character pointer

  31. Explain rules of defining a double pointer

  32. Explain rules of defining a function pointer

  33. Write a function which takes function pointers as arguements

  34. Write a function which returns function pointer

  35. EXplain rules of defining array of function pointers

  36. Explain rules of defining function pointers inside a structure

  37. Explain rules of defiing array of integer pointers

  38. Explain rules of defiing array of float pointers

  39. Explain rules of defiing array of double pointers

  40. Explain rules of defiing array of character pointers

  41. Explain rules of defiing array of structure pointers

  42. Explain rules of defiing array of union pointers

  43. Explain rules of pointer arithmetic

  44. Explain rules of using a compile time macros

  45. Explain rules of using sizeof() operator on different types

  46. Explain rules of structure padding

  47. Explain rules of structure packing

  48. Explain rules of bit fields in structures

  49. Explain rules of zero length arrays in structures

  50. Explain rules of using all format specifiers

C Basics-Level 2 - Differences

  1. Difference between one’s complement and two’s compiement and application

  2. Difference between Little endian and Big endian

  3. Difference between OR and XOR

  4. Difference between OR and XNOR

  5. Difference between OR and AND

  6. Difference between & and &&

  7. Difference between | and ||

  8. Difference between sizeof(int) in 32 bit and 64 bit machines

  9. Difference between structure and union

  10. Difference between structure padding and structure packing

  11. Difference between macros and inline functions

  12. Difference between normal functions and inine functions

  13. Difference between normal functionsand static functions

  14. Difference between “int” and “unsigned int”

  15. Difference between “double” and “long long double”

  16. Difference between pre-increment and post-increment in case of simple integers

  17. Difference between pre-increment and post-increment in case of integer pointers

  18. Difference between C and C++

  19. Differnce between local variables and global variables

  20. Difference between local static variable and global static variables

  21. Difference between initialised global variables and not intialised global variables

  22. Difference between “auto” variables and “register” variables

  23. Difference between call by value and call by reference

  24. Difference between while and do while

  25. Difference between strncat and strlcat

  26. Difference between strncpy and strlcpy

  27. Difference between strcat and strncat

  28. Difference between strcpy and strncpy

  29. Difference between strcmp and memcmp

  30. Difference between strcpy and memcpy

  31. Difference between malloc and calloc

  32. Difference between malloc and realloc

  33. Difference between fopen, open

  34. Difference between ~ and !

  35. Difference between RAM and ROM

  36. Difference between declaration and defintion

  37. Difference between function prototype and function definition

  38. Difference between printf and fprintf

  39. Difference between float and double

  40. Difference between variable and constant

  41. Difference between gets and fgets

  42. Difference between far pointers and near pointers

  43. Difference between arrays and pointers

  44. Difference between array of integer pointers and array of array of integers

  45. Difference between two dimensional arrays and double pointers

  46. Difference between modifiers and qualifiers

  47. Difference between storage class specifiers and format specifiers

  48. Difference between < and << operator

  49. Difference between > and >> operator

  50. Difference between Postfix and Prefix operations

  51. Difference between string and array of characters

C Basics-Level 3 - Compilation stages

  1. Explain stages of compilation involved when program is compiled

  2. Explain memory layout of a running process

  3. Explain memory layout of a compiled program

  4. Differnce between Segments and sections

  5. Differnce between code segment and data segment

  6. Difference between BSS and initialised data segment

  7. Difference betwen Unix and Linux

  8. DIffernce between syntac analyser and semantic analyser

  9. What are the responsibilities of a pre-processor

  10. What are the responsibilities of an assembler

  11. What are the responsibilities of a linker/loader

  12. What are the contents of an object file

  13. What are the contents of an ELF a.out file

C Basics-Level 4 - Searching - Arrays

  1. Implement Linear searching algorithm

  2. Implement binary searching algorithm

  3. Implement my_strstr similar to strstr

  4. Search and replace letter ‘a’ in a string with letter ‘k’

  5. Search and replace letter ‘a’ in a string with letter ‘k’ in a file containing a plain text

C Basics-Level 5 - Sorting - Arrays

  1. Implement bubble sort algorithm to sort an array in increasing way

  2. Implement bubble sort algorithm to sort an array in decreasing way

  3. Implement selection sort algorithm to sort an array in increasing way

  4. Implement selection sort algorithm to sort an array in decreasing way

  5. Implement insertion sort algorithm to sort an array in increasing way

  6. Implement insertion sort algorithm to sort an array in decreasing way

  7. Implement merge sort algorithm to sort an array in increasing way

  8. Implement merge sort algorithm to sort an array in decreasing way

  9. Implement quick sort algorithm to sort an array in increasing way

  10. Implement quick sort algorithm to sort an array in decreasing way

  11. Implement heap sort algorithm to sort an array in increasing way

  12. Implement heap sort algorithm to sort an array in decreasing way

  13. Implement counting sort algorithm to sort an array in increasing way

  14. Implement counting sort algorithm to sort an array in decreasing way

  15. Implement Radix sort algorithm to sort an array in increasing way

  16. Implement Radix sort algorithm to sort an array in decreasing way

  17. Implement Bucket sort algorithm to sort an array in increasing way

  18. Implement Bucket sort algorithm to sort an array in decreasing way

  19. Implement Shell sort algorithm to sort an array in increasing way

  20. Implement Shell sort algorithm to sort an array in decreasing way

  21. Sort an array of employees based on their name

  22. Sort an array of employees based on their age

  23. Sort an array of employees based on their salary

C Basics-Level-6 - integer Programs

  1. Progam to find if a number is odd or even

  2. Progam to find if a number is prime or not

  3. Program to find the Nth fibonacci number

  4. Program to print the fibonacci series

  5. Program to find the factorial of a number

  6. Program to reverse an integer. Input : 12345, Output : 54321

  7. Program to find the power of a number; Input : Base, power Output : (Base)^Power

  8. Program to print all prime numbers till 1000

  9. Program to print all perfect square numbers till 1000. 1, 4, 9, 16, 25 etc.,

  10. Program to check if a number is perfect cube or not

  11. Program to swap two numbers stored in two different variables

  12. Program to find sum of all numbers in an array of integers

  13. Program to find product of all numbers in an array of integers

  14. Program to create an union of two integer arrays

  15. Program to create an intersection of two integer arrays

  16. Program to remove duplicate integers in an array of integers

  17. Program to add only even numbers in an array of integers

  18. Program to add only odd numbers in an array of integers

  19. Program to delete all negative numbers in an array of integers

  20. Program to count number of integers which are palnidrome numbers in an array of integers

  21. Program to count number of perfect cubes in an array of integers

  22. Program to find the square root of a number

  23. Program to find all the divisors of a given number

  24. Program to print the tables of a given number from 1 to 10

  25. Program to perform matrix addition

  26. Program to perform matric multiplication

  27. Program to reverse the contents of an integer array

  28. Program to find the smallest element and it’s position in an array

  29. Program to find the larget element and it’s position in an array

  30. Program to convert to “centimeters” to “inches”

  31. Program to convert seconds to microseconds

  32. Program to swap two numbers without using temporary variables

  33. Program to find the sum of all negative numbers in an array

  34. Program to find LCM and HCF

  35. Program to add all digits in a given integer

C Basics-Level-7 - Bitwise programs

  1. Program to set a bit at a particular position in an integer

  2. Program to clear a bit at a particulat position in an integer

  3. Program to count how many bits are set in an integer

  4. Program to count how many bits are not set in an integer

  5. Program to check if a system is little endian or big endian

  6. Program to swap byte3, byte 2 with byte 1, byte 0 in a 32 bit integer

  7. Program to convert all 1s to 0s and all 0s to 1s in an integer

  8. How negative integer numbers are represented in an integer

  9. How negative integer numbers are represented in a float

  10. Program to find a if a number is odd or even using bitwise operators

  11. Program to swap two numbers without using temporary variables using bitwise operators

  12. Program to multiply a number by 2 using bitwise operator

  13. Program to divide a number by 2 using bitwise operator

  14. Program to set all bits between positions M and N

  15. Program to clear all bits between positions M and N

  16. Program to swap bits from M,N with P,Q in an integer

C Basics-Level-8 - memory allocation programs

  1. Program to allocate a single block of integer using malloc

  2. Program to allocate a single block of float using malloc

  3. Program to allocate a single block of double using malloc

  4. Program to allocate a single block of char using malloc

  5. Program to allocate a multiple blocks of integer using malloc

  6. Program to allocate a multiple blocks of float using malloc

  7. Program to allocate a multiple blocks of double using malloc

  8. Program to allocate a multiple blocks of char using malloc

  9. Program to allocate memory to a double integer pointer, store and access data using single and double indirection

  10. Program to allocate memory to triple integer pointer, store and access data using single, double & triple indirection

  11. Program to allocate memory to array of integer pointers, store and access data using indirection

  12. Program to allocate memory to a structure pointer, store and access data using single indirection

  13. Program to allocate memory to an array of structure pointers, store and access data using single indirection

  14. Program to allocate memory to a double structure pointer, store and access data using indirection

C Basics-Level-9 - C library APIs

  1. Program to learn use of string.h APIs
    • strlen - calculate the length of a string

    • strcat - concatenate two strings

    • strncat - concatenate two strings

    • strlcat - size-bounded string concatenation

    • strcmp - compare two strings

    • strncmp - compare part of two strings

    • strchr - string scanning operation

    • strrchr - string scanning operation

    • strchrnul - string scanning operation

    • strstr - find a substring

    • strcasestr - find a substring

    • strcasecmp - case-insensitive string comparisons

    • strpbrk - scan a string for a byte

    • strsep - extract token from string

    • strspn - get length of a substring

    • strtok - split string into tokens

    • strtok_r - split string into tokens

    • strcpy - copy a string and return a pointer to the end of the result

    • strncpy - copy fixed length string, returning a pointer to the array end

    • strlcpy - size-bounded string copying

    • stpcpy - opy a string and return a pointer to the end of the result

    • strcoll - string comparison using collating information

    • strcspn - get the length of a complementary substring

    • strdup - duplicate a specific number of bytes from a string

    • strndup - duplicate a specific number of bytes from a string

    • strfry - randomize a string

    • strxfrm - string transformation

  2. Program to learn use of memory allocation APIs
  3. Program to learn use of mem_xxxx APIs
  4. Program to learn use of b_xxxx APIs
    • bcopy - copy byte sequence

    • bstring - byte string operations

    • bcmp - compare byte sequences

    • bzero - zero a byte string

  5. Program to learn use of C library file operation APIs
    • fopen - open a stream

    • fdopen - associate a stream with a file descriptor

    • freopen - open a stream

    • fclose - close a stream

    • fmemopen - open a memory buffer stream

    • fflush - flush a stream

    • fcloseall - close all open streams

    • fseek - reposition a stream

    • ftell - return a file offset in a stream

    • rewind - reset the file position indicator in a stream

    • fgetpos - get current file position information

    • fsetpos - set current file position

    • fprintf - print formatted output

    • fscanf - convert formatted input

  6. Program to learn formatted output conversion
    • printf - print formatted output

    • fprintf - print formatted output

    • dprintf - print formatted output

    • sprintf - print formatted output

    • snprintf - print formatted output

    • vprintf - format the output of a stdarg argument list

    • vfprintf - format output of a stdarg argument list

    • vdprintf - format output of a stdarg argument list

    • vsprintf - format output of a stdarg argument list

    • vsnprintf - format output of a stdarg argument list

  7. Program to learn file read, write APIs
    • fgetc - get a byte from a stream

    • fgets - get a string from a stream

    • fputc - put a byte on a stream

    • fputs - put a string on a stream

    • getc - get a byte from a stream

    • getchar - get a byte from a stdin stream

    • ungetc - push byte back into input stream

    • putc - put a byte on a stream

    • putchar - put a byte on a stdout stream

    • puts - put a string on standard output

  8. Program to learn use of pthread_xxxx apis
  9. Program to learn conversion of string to integer
    • atoi - convert a string to an integer

    • atol - convert a string to a long integer

    • atoll - convert a string to a long integer

    • atof - convert a string to a double-precision number

  10. Program to learn apis from ctypes.h - character classification functions
    • isalnum - test for an alphanumeric character

    • isalpha - test for an alphabetic character

    • isascii - test for a 7-bit US-ASCII character

    • isblank - test for a blank character

    • iscntrl - test for a control character

    • isdigit - test for a decimal digit

    • isgraph - test for a visible character

    • islower - test for a lowercase letter

    • isprint - test for a printable character

    • ispunct - test for a punctuation character

    • isspace - test for a white-space character

    • isupper - test for an uppercase letter

    • isxdigit - test for a hexadecimal digit

    • isalnum_l - test for an alphanumeric character

    • isalpha_l - test for an alphabetic character

    • isblank_l - test for a blank character

    • iscntrl_l - test for a control character

    • isdigit_l - test for a decimal digit

    • isgraph_l - test for a visible character

    • islower_l - test for a lowercase letter

    • isprint_l - test for a printable character

    • ispunct_l - test for a punctuation character

    • isspace_l - test for a white-space character

    • isupper_l - test for an uppercase letter

    • isxdigit_l - test for a hexadecimal digit

  11. Program to learn apis to compute the absolute value of an integer
    • abs - return an integer absolute value

    • labs - return a long integer absolute value

    • llabs - return a long integer absolute value

    • imaxabs - return absolute value

  12. Program to learn apis from time.h
    • asctime - convert date and time to a string

    • time - get time

    • clock - report CPU time used

    • ctime - convert a time value to a date and time string

    • difftime - compute the difference between two calendar time values

    • gmtime - convert a time value to a broken-down UTC time

    • localtime - convert a time value to a broken-down local time

    • mktime - convert broken-down time into time since the Epoch

    • strftime - convert date and time to a string

    • strptime - date and time conversion

  13. Program to learn variable arguement APIs
    • va_start - handle variable argument list

    • va_arg - handle variable argument list

    • va_copy - handle variable argument list

    • va_end - handle variable argument list

  14. Program to find offset of a structure member
    • offsetof - offset of a structure member

Note

An exercise : Complete this exercise !

Test an API by passing inputs as defined in Five modules

C Basics-Level-10 - String programs

  1. Implement custom definitions of below APIs, using loops (for or while)
    • strlen - calculate the length of a string

    • strcat - concatenate two strings

    • strncat - concatenate two strings

    • strlcat - size-bounded string concatenation

    • strcmp - compare two strings

    • strncmp - compare part of two strings

    • strchr - string scanning operation

    • strrchr - string scanning operation

    • strchrnul - string scanning operation

    • strstr - find a substring

    • strcasestr - find a substring

    • strcasecmp - case-insensitive string comparisons

    • strpbrk - scan a string for a byte

    • strsep - extract token from string

    • strspn - get length of a substring

    • strtok - split string into tokens

    • strtok_r - split string into tokens

    • strcpy - copy a string and return a pointer to the end of the result

    • strncpy - copy fixed length string, returning a pointer to the array end

    • strlcpy - size-bounded string copying

    • stpcpy - opy a string and return a pointer to the end of the result

    • strcoll - string comparison using collating information

    • strcspn - get the length of a complementary substring

    • strdup - duplicate a specific number of bytes from a string

    • strndup - duplicate a specific number of bytes from a string

    • strfry - randomize a string

    • strxfrm - string transformation

  2. Program to search letter ‘a’ and replace it with letter ‘k’ in a string

  3. Program to search letter ‘a’ and replace it with letter ‘k’ in an array of strings

  4. Program to reverse a string using for or while loop

  5. Program to reverse all strings in an array of strings

  6. Program to convert all charcaters to capital letters in a string

  7. Program to convert all charcaters to capital letters in all strings in an array of strings

  8. Program to convert all charcaters to small letters in a string

  9. Program to convert all charcaters to small letters in all strings in an array of strings

  10. Program to replace occurance of word “paper” with “pen” in a string

  11. Program to replace occurance of word “paper” with “pen” in all strings in an array of strings

  12. Program to search letter ‘a’ and delete it in a string

  13. Program to search letter ‘a’ and delete it in an array of strings

  14. Program to replace occurance of word “paper” and delete it in a string

  15. Program to replace occurance of word “paper” and delete in all strings in an array of strings

  16. Program to print A-Z and a-z

  17. Program to count number of new lines in a string or array of strings

  18. Program to check if a string is a palindrome

  19. Program to check if a string is a proper IPv4 address or not

  20. Program to check if a string is a proper MAC address or not

  21. Program to check if two strings are anagram of each other

  22. Program to count number of words in a string where each word is separated by space

  23. Program to remove all characters which are not alphabets in a string

  24. Program to sort the letters in a string as per alphabetical order

  25. Program to sort the strings in an array of strings similar to a dictionary

  26. Program to sort all characters in all strings in an array of strings

  27. Program to extract the digits from a string and store them in integer variables

  28. Program to extract information from an excel sheet and store it in a proper data structure in RAM

  29. Program to remove any leading spaces in a string or array of strings

  30. Program to remove any trailing spaces in a string or array of strings

  31. Program to remove leading spaces, trailing spaces and white spaces in a string or array of strings

  32. Program to find out smallest word in an english statement

  33. Program to find out longest word in an english statement

C Basics-Level-11- Data structure programs

  1. Program to implement Single linked list with functions insert_at_front, insert_at_rear, insert_at_position, delete_at_front, delete_at_rear, delete_at_position

  2. Program to implement Double linked list with functions insert_at_front, insert_at_rear, insert_at_position, delete_at_front, delete_at_rear, delete_at_position

  3. Program to implement Binary search tree with functions insert_left, insert_right, delete_left, delete_right, search

  4. Program to implement stacks using arrays

  5. Program to implement stacks using Single linked lists

  6. Program to implement Queues using Single linked lists

  7. Program to implement stacks using Double linked lists

  8. Program to implement Queues using Double linked lists

  9. Program to reverse a single linked list using iteration

  10. Program to print the left view of binary tree

  11. Program to print the right view of binary tree

  12. Program to create a mirror copy of binary tree

  13. Program to implement a disctionary search of strings using hastable of single linked lists

  14. Program to implement Min-Heap

  15. Program to implement Max-Heap

  16. Program to implement AVL trees

  17. Program to implement threaded binary trees

  18. Program to implement B+ trees

  19. Program to implement red black trees

  20. Program to implement double ended queues

  21. Program to implement circular queues

  22. Program to implement circular linked lists

  23. Program to implement a custom malloc and free operation

C Basics-Level-12- Recursion programs

  1. Implement custom definitions of below APIs, using recursion
    • strlen - calculate the length of a string

    • strcat - concatenate two strings

    • strncat - concatenate two strings

    • strlcat - size-bounded string concatenation

    • strcmp - compare two strings

    • strncmp - compare part of two strings

    • strchr - string scanning operation

    • strrchr - string scanning operation

    • strchrnul - string scanning operation

    • strstr - find a substring

    • strcasestr - find a substring

    • strcasecmp - case-insensitive string comparisons

    • strpbrk - scan a string for a byte

    • strsep - extract token from string

    • strspn - get length of a substring

    • strtok - split string into tokens

    • strtok_r - split string into tokens

    • strcpy - copy a string and return a pointer to the end of the result

    • strncpy - copy fixed length string, returning a pointer to the array end

    • strlcpy - size-bounded string copying

    • stpcpy - opy a string and return a pointer to the end of the result

    • strcoll - string comparison using collating information

    • strcspn - get the length of a complementary substring

    • strdup - duplicate a specific number of bytes from a string

    • strndup - duplicate a specific number of bytes from a string

    • strfry - randomize a string

    • strxfrm - string transformation

  2. Program to implement tower of hanoi using recursion

  3. Program to reverse a string using recursion

  4. Program to reverse a linked list using recursion

  5. Program to print fibonacci series usinf recursion

  6. Program to find sum of all numbers in an integer array using recursion

  7. Program to implement insert_at_rear and delete_at_rear using recursion in single linked lists

  8. Program to print the contens of an integer array using recursion

  9. Program to print A-Z or a-z using recursion

  10. Program to print sum of digits of an integer using recursion

  11. Program to find GCD of two numbers using recursion

  12. Program to find factorial of a number using recursion

  13. Convert all above programs having loops to recursion

C Basics-Level-13- File operation programs

  1. Program to create an empty file

  2. Program to write 1 to 100 into a file

  3. Program to write a string to a file

  4. Program to write an array of strings to a file

  5. Program to count number of characters in a file

  6. Program to count number of words in a file

  7. Program to count number of new lines in a file

  8. Program to count number of occurances of character ‘a’ in a file

  9. Program to create a file which is a copy of another file

  10. Program to print list of file names present in the current directory

  11. Program to delete a file in the current directory whose name matches the input arguement

  12. Programt to search and replace letter ‘a’ with letter ‘k’ in a file

  13. Program to seach and replace word “paper” with the word “pen” in a file

  14. Program to count how many ip address strings are present in a file

  15. Program to count how many mac address strings are present in a file

  16. Program to delete occurances of “paper” in a file

  17. Program to search and replace all occurances of words “paper”, “book” with “pen” and “pencil” respectively

  18. Program to count number of anagrams in a file

  19. Program to count number of palindromes in a string

  20. Program to delete all the contents of a file

  21. Program to delete all new lines in a file

  22. Program to number of lines, number of characters and number of words in a file

  23. Program to split an input file and create two files exactly into two halves

  24. Program to split an input file into multiple files based on number of lines input by the user

  25. Program to split an input file into multiple files based on output size input by the user

C Basics-Level-14- Applications of Data structures

Store the list of club membership records in a file named ""Club_Membership_2020.txt"" and use the file as input for the below 30 questions:
Abbrevations: 
SLL: Singly linked list
DLL: Doubly linked list
CSLL: Circular singly linked list
CDLL: Circular doubly linked list

$ cat Club_Membership_2020.txt

ID	Name	            Gender	Occupation	Age
1001	Jennifer Crawford   Female	Engineer	32
1002	Skylar Sean	    Female	Author	        25
1003	Angelina John	    Female	Doctor	        45
1004	Karen Tatum	    Female	Doctor	        34
1005	Tanya Brown	    Female	Engineer	34
1006	Frank Bryce	    Male	Doctor	        50
1007	Jason Frank	    Male	Doctor	        49
1008	Jimmy White	    Male	Author	        33
1009	Lenny Bruce	    Male	Engineer	37
1010	Lara Kilarney	    Female	Doctor	        49
1011	Martha Stalwart	    Female	Politician	41
1012	Ron Wesley	    Male	Driver	        35
1013	Minnie Drover	    Female	Actor	        35
1014	Tom Fullerton	    Male	Actor	        34
1015	Carl Jackson	    Male	Manager	        60
  1. SLL: Store the list of records in a singly linked list. Print all entries in the linked list.

  2. SLL: Store the list of records in a singly linked list after sorting the records in alphabetic order by member names. Print all entries in the linked list.

  3. SLL: Store the list of records in 2 singly linked lists according to gender. Print all entries in each linked list.

  4. SLL: Store the list of records in mutiple SLL according to age buckets (21-30, 31-40, 41-50, 51-60). Print all entries in each linked list.

  5. SLL: Store the list of records in a singly linked list. Print all entries in the linked list. Delete all records which fall in the age bucket of 21-30 and print the SLL once again.

  6. SLL: Store the list of records in a singly linked list. Print all entries in the linked list. Increase the age of all members by 1 and print the SLL once again.

  7. SLL: Store the list of records in a singly linked list. Print all entries in the linked list. While displaying the SLL, print an additional text “[Mark for title upgrade]” for all members whose age is greater than 45.

  8. SLL: Store the list of records in a singly linked list. Delete every alternate entry in the SLL.

  9. CSLL: Store the list of records in a circular singly linked list. Print all entries in the linked list.

  10. CSLL: Store the list of records in a circular singly linked list after sorting the records in alphabetic order by member names. Print all entries in the CSLL but starting from the alphabet J

  11. CSLL: Store the list of records in a circular singly linked list. Print all entries in the linked list. Delete all records which match the occupation “Engineer” and print the CSLL once again.

  12. CSLL: Store the list of records in a circular singly linked list. Print all entries in the linked list. Modify the ID of all records by adding the value 100 to it and print the CSLL once again.

  13. CSLL: Store the list of records in a circular singly linked list. Print only the members in the CSLL who are above the age of 40 and match the occupation “Doctor”.

  14. CSLL: Store the list of records in a CSLL. Delete every alternate entry in the CSLL

  15. DLL: Store the list of records in a doubly linked list. Print all entries in the DLL

  16. DLL: Store the list of records in a doubly linked list after sorting the records in alphabetic order by member surnames. Print all entries in the DLL.

  17. DLL: Store the list of records in 2 singly linked lists according to gender. Print all entries in each DLL starting from the tail of the DLL.

  18. DLL: Store the list of records in mutiple DLLs according to age buckets (21-30, 31-40, 41-50, 51-60). Print the DLL. Delete the entries in the age bucket 41-50 and print the DLL once again

  19. DLL: Store the list of records in mutiple DLLs according to age buckets (21-30, 31-40, 41-50, 51-60). The records in the age bucket must be storted acording to increasing age. Print all entries in each DLL in reverse age order for each bucket.

  20. DLL: Store the list of records in a doubly linked list. Sort all entries according to occupation. Print only one entry for each occupation.

  21. DLL: Store the list of records in a doubly linked list. Sort all entries alphabetically according to occupation. Delete entries such that only one entry is present for each occupation in the DLL.

  22. DLL: Store the list of records in a doubly linked list. Delete every alternate entry in the DLL.

  23. DLL: Store the list of records in a doubly linked list. Sort all entries alphabetically according to occupation and print the DLL(Order should be: Actor list <-> Author list <-> Doctor <-> Engineer <-> Manager <-> Politician). Swap the order for the occupation entries “Doctor” and “Engineer” (Order should be Actor <-> Author <-> Engineer <-> Doctor <-> Manager <-> Politician)

  24. CDLL: Store the list of records in a circular doubly linked list. Print all entries in the CDLL

  25. CDLL: Store the list of records in a circular doubly linked list after sorting the records in alphabetic order by member names. Print all entries in the CDLL, starting from the alphabet M but in reverse alphabetic order.

  26. CDLL: Store the list of records in a circular doubly linked list. Print only the members in the CDLL who are above the age of 40.

  27. CDLL: Store the list of records in a CDLL. Print only the members of the CDLL whose first or last name start with the letter J

  28. CDLL: Store the list of records in a CDLL. Delete all entries whose occupation matches Actor and print the CDLL.

  29. CDLL: Store the list of records in a CDLL. Entries must be sorted according to occupation. Print the CDLL.

  30. CDLL: Store the list of records in a CDLL. Delete every alternate entry in the CDLL

C Basics-Level-15 - Structures

Experiment all examples in below categories

Structure syntax

Structure Single Pointers

Structure Double Pointers

Structure Triple Pointers

Structure padding

Structure packing

Structure bitfields

Zero length arrays in structures

Difference between structures and unions

Function pointers inside structures

Self referential pointers in structures

Read ahead structure declaration

Structures declaration with typedef

Anonymous structures

Structures inside a union

Unions inside a structure

Structures with in a structure

Passing structure as function arguments

Returning structure as function return types

C Basics-Level-16 - Macros

Experiment all examples in below categories

Object-like Macros

Function-like Macros

Macro Arguments

Stringizing

Concatenation

Variadic Macros

Predefined Macros

Undefining and Redefining Macros

Directives Within Macro Arguments

Macro Pitfalls

C Basics-Level-17 - Function Pointers

Write sample programs to underatnd below function pointer declarations

Declaration

Description

typedef int (*fptr)(int, int); fptr fp;

fp is a function pointer which can hold the address of a function which takes two integers as a parameter and returns an integer

typedef int fptr(int, int); fptr *fp;

fp is a function pointer which can hold the address of a function which takes two integers as a parameter and returns an integer

typedef int (*fptr)(int, int); fptr fp[10];

fp is an array of function pointers where each function pointer can hold the address of a function which takes two integers as a parameter and returns an integer

typedef int fptr(int, int); fptr *fp[10];

fp is an array of function pointers where each function pointer can hold the address of a function which takes two integers as a parameter and returns an integer

typdef int (*fptr)(int, int); fptr fun(fptr)

fun is a function which takes a function pointer as an arguement and returns a function pointer

typdef int fptr(int, int); fptr *fun(fptr *)

fun is a function which takes a function pointer as an arguement and returns a function pointer