logo

Crowdly

Coding Café

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.

View this question

FILE *fp1 = fopen("states.txt", "r");

while ((ch = fgetc(fp1)) != EOF)

          putchar(ch);

fclose(fp1);

Write the equivalent Unix command for the above code.

View this question

fopen() can be used to read from or write into a file stream.

View this question
The statement free(ptr); when used in the program does which of the following?

View this question
Pick all statements that allocate an array of 48 characters on the heap.

View this question
Read from a file and double space the data i.e., every line should be double separated. Store this output in another file.

View this question

The

file

/home/sharing/numbers.txt

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

result.txt.

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.

View this question

Write a program to implement the cp

command of Unix.

View this question
Create a question that tests one's conceptual understanding of any of these topics - arrays, pointers, functions. The question you write down will be graded on the basis of its depth and clarity. (In case you are reproducing the question you found somewhere, write the source.)

View this question

Which of the

following statements about arrays in C is correct?

0%
0%
0%
View this question

Want instant access to all verified answers on dle.plaksha.edu.in?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!