Write a program in C to count no. Words in a multi-line user input. Calculate the factorial of a number given at command line, using recursion. Write a function that takes a single string as its argument and returns a pointer to the first numeric character in the string.
Write a program in C to count no. Words in a multi-line user input. Calculate the factorial of a number given at command line, using recursion. Write a function that takes a single string as its argument and returns a pointer to the first numeric character in the string.
Write a program in C to count no. Words in a multi-line user input. Calculate the factorial of a number given at command line, using recursion. Write a function that takes a single string as its argument and returns a pointer to the first numeric character in the string.
2. What are Preprocessors in C. Explain. 3. Write a program in C to count no. words in a multi-line user input. 4. WAP in C to calculate the factorial of a number given at command line, using recursion. 5. WAP in C to reverse a character string. 6. WAP in C to extract characters from a multi-digit integer and then reverse the string. (e.g. digit – 465786, then character string - 465786, and reverse string – 687564) 7. 2n+1 numbers in a list except for 1 number all had duplicates, how to find unique number, write a program in C. 8. WAP in C to convert all upper case letters in user input to lower case with if-else construct. (Do not use toupper() or tolower() functions). 9. WAP in C to concatenate two strings. Use pointers only to store strings and do not make use of any library function to concatenate. Do not use arrays anywhere. 10. Write a function strend(s, t), which returns 1 if the string t occurs at the end of the string s, and zero otherwise. 11. WAP that converts numbers to words. Example – 87 results in “Eighty Seven”. 12. WAP that counts the number of bits set in a number. Example – the number 11 (decimal), 00001011 (in binary) has 3 bits set. 13. Write a function that takes a single string as its argument and returns a pointer to the first numeric character in the string. 14. What are the foundation principles of Object Oriented Programming? 15. Define a Class with the help of an example. 16. What are constructors and destructors. WAP in C++ to demonstrate the use of – 1. Default Constructor, 2. Copy Constructor, 3. Parametric Constructor. 17. What do you mean by Inheritance. Define – 1. Multiple Inheritance, 2. Multilevel Inheritance, 3. Hybrid Inheritance. 18. What is Diamond Problem. WAP to demonstrate. 19. What is Polymorphism. Explain with the help of a program. 20. What is Operator Overloading. WAP in C++ to overload increment (++), decrement (--), Addition (+) and Subtraction (-) Operators. Define a Class as you wish to demonstrate. 21. What are Friend Functions. WAP to demonstrate the use of friend functions in a real world problem. 22. What are Virtual Functions. Are these different from Pure Virtual Functions. Explain. WAP in C++ to demonstrate. 23. WAP in C++ to concatenate two binary files. Make use of buffer of predefined size. Use Command Line Arguments to input filenames of both input files and one output file. 24. What are typedef and enum. WAP to show the use of them. 25. What is Dynamic Memory Allocation in Programming. WAP to demonstrate the use of malloc() and calloc(). Make use of delete() also.
Note: All the programs given in C need to be in pure C, no use of any
library function or header file out of the scope of C. Everything Handwritten.