Initial Basics – Algebra – Problem #42

IIT Kharagpur CS10001 / CS11001 Programming and Data Structures Lab Question Archive

Difficulty: Hard

Problem Statement

Write a C-program which evaluates the value of the following function as given below for an input real number x (to be read): f(x)= x 4 -36x3 +4x-3 The program also computes the sign of the derivative of the function (f’(x)). If the derivative is positive, it prints ‘1’. If it is negative, prints ‘-1’. Otherwise, it prints ‘0’. Run your program to provide results for the following input numbers. -5.4, 2.4, 3.0, 5.0, and 38.

Back to Lab Problems
Initial Basics/Algebra/Problem #42

Lab Problem Statement

Specifications & Problem DetailsIIT Kharagpur PDS Archive
Loading question...

Interactive C Compiler · Problem #42

WASM In-Browser

Runs directly on your machine · Zero remote server dependency

Compiler downloads on first Run (large, saved in your browser after that)
main.cCtrl + Enter to run
1
2
3
4
5
6
7
Input (stdin)given to scanf / cin
Output

Output appears here. Press Run to compile and execute.