Looking for Coding Café test answers and solutions? Browse our comprehensive collection of verified answers for Coding Café at dle.plaksha.edu.in.
Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!
Write a function called isPalindrome() that takes an integer and checks if it is a “palindrome” or not. For instance, the numbers 747, 4, and 12421 are palindromes, while 52, 124, and 766 are not palindromes. If the number is a palindrome the function should return 1, otherwise it should return 0.
FILE *fp1 = fopen("states.txt", "r");while ((ch = fgetc(fp1)) != EOF) putchar(ch);fclose(fp1);
Write the equivalent Unix command for the above code.
fopen() can be used to read from or write into a file stream.
The file contains ten integers across seven lines. The task is to find out the average of these ten integers and copy the integers as well as the average into another file called
Additional exercises:
Pick only those odd numbers from the ten
numbers of the file and write these odd numbers, as well as their average into an
output file.
Next, modify the original program so that
instead of assuming the number of integers to be read from the file, the
program reads till all the integers of the file are read.
Write a program to implement the cp command of Unix.
Which of the following statements about arrays in C is correct?
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!