CS5001 Assignment 1 solved

$35.00 $21.00

Category: You will receive a download link of the .ZIP file upon Payment


5/5 - (1 vote)

Create a C project “assignment-1” in Eclipse or another IDE. Create a source directory “src” in the project. Create an empty C file “assignment-1.c” and edit it to look like this:

* @file assignment-1.c
* @author YOUR NAME
* @date THE DATE
* This is the first programming assignment for CS 5001.

* The code in this function is the solution to the assignment.
int main(void) {

Define and initialize the following variable or constant with the appropriate type and value. In some cases, you will use operators to compute the value.

An unsigned integer constant squareOfThree initialized by calculating the square of 3
A double precision floating point constant e initialized to Euler’s constant 2.718281828459045
A boolean variable isGreaterThan initialized to the logical expression 2.8 > e
An integer variable quotient initialized to the ratio of sum 2+4+5 divided by 3
A short integer variable remainder that is the remainder of 11 with 3
A double precision variable greaterValue that is 2.8 if isGreaterThan is true and e if isGreaterThan is false.
A single precision floating point constant oneTenth initialized to the ratio of 1.0 divided by 10.0
A character hex7A whose value is the hexadecimal constant 7A.
A character constant charZ initialized to ‘Z’.
An unsigned short variable numLetters that is the number of letters between ‘A’ and ‘Z’ inclusive.
For each variable or constant, provide a printf() statement using the apropriate field specifier that prints its name, its value, and its size in bytes.