Ask Question, Ask an Expert

+1-415-315-9853

info@mywordsolution.com

Ask C/C++ Expert


Home >> C/C++

problem1)

a)

prepare a C program that shows the use of mathematical functions to compute

i) absolute value of a real number

ii) exponential of a real number

b) prepare C statements which show the use of escape sequences\ n and\?

c) Describe how variables of type int , long int , short int and unsigned int are declared.

d) Which of the following are valid C variables?

i) Count_xyz

ii) Continue

iii) const

iv) case

v) enum_variable

vi) m298773

vii) +signed_Value

viii) _under_bar

problem2)

a) The program given below shows how char and int data types could be used interchangeably.

Find the output of the program.
#include

int
main()
{
char
height=72,width=87,length=76;
int
volume;
printf("The formula for volume is\n");
printf(“%c=%c*%c*%c”,’V’,height,width,length);
volume = height*width*length;
printf(“\nvolume=%d”,volume);
return0;
}

b) Identify the syntax errors in the following statements, if any, and do the essential corrections. (Suppose that x, y, z are declared as int variables.)

i) scan f(“%d,%d”, x,y);

ii) if (x =! y) z = x-y, y = z + x;

iii) print f(“%d,z = ” &z);

iv) x = x + y =< 30;

c) Describe step by step the statement result += (value++ * 5) + ( value++ *3);

d) Describe the output of the following piece of the code

if(!((7>5)*(6<5)))

{printf("Go to your home.");
goto Home;}

else printf("Come,let's study together");

Home: printf(“\n Bye..See you Tomorrow!”);

C/C++, Programming

  • Category:- C/C++
  • Reference No.:- M92583
  • Price:- $70

Priced at Now at $70, Verified Solution

Have any Question? 


Related Questions in C/C++

1 three employees in a company are up special pay increase

1. Three employees in a company are up special pay increase. You are given a file, with the following data: Miller Andrew 65789.87 5 Green Sheila 75892.56 6 Sethi Amit 74900.50 6.1 Each input line consists of an employee ...

Write a program that reads numbers from cin and then sums

Write a program that reads numbers from cin and then sums them, stopping when 0 has been entered. Construct three versions of this program, using the while ,do - while , and for loops. Add the following to your program: ...

Assignmentpart acomplete the following questionswrite c

Assignment Part A Complete the following questions: Write C++ code to open a document with the name Hello.txt, place the message "Hello, World!" in the document, and exit the document. Re open the file you closed, and re ...

Design implement test and debug a c program to simulate the

Design, implement, test, and debug a C# program to simulate the rolling of two dice 100 times. Whenever the two dice display the same number, the program should show the roll sequence number (e.g. the 10th roll) and the ...

Assignmentoverviewthis assignment consists of implementing

Assignment Overview This assignment consists of implementing an application using the techniques learned in the first half of the course. Examples on how to use file operations, random number generation, the standard tem ...

Programming in cbubba tubs bbq rub is a company that makes

Programming in C++ Bubba Tub's BBQ Rub is a company that makes different BBQ dry rubs and sauces. They make each product when it is ordered with the freshest ingredients and sell it by the unit. A unit is 2 ounces of pro ...

Assignmentconsider the following declarationsclass

Assignment Consider the following declarations: class bagType { public: void set(string, double, double, double, double); void print() const; string getStyle() const; double getPrice() const; void get(double, double, dou ...

Assignmentinstructionsthis assignment is to implement your

Assignment Instructions This assignment is to implement your own mini-grocery store in C++. Suppose you have the following Food hierarchy: FOOD FRUIT APPLE BANANA GRAPE DAIRY MILK YOGURT CHEESE (your choice) (three items ...

Computer sciencewhere do you think c and coding games in c

Computer Science Where do you think C++ and coding games in C++ is headed in the next five years? How about in the next 10 years? Do you think there are any significant improvements that need to be made to the code to en ...

Assignment part acreate a checkbook program using c

Assignment (part a) Create a Checkbook program using C : • Create a Check structure. Include:   o Check number (should be an integer).   o Date (use type char[ ]).   o To   o Amount   o Description • Add functions to:   ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

WalMart Identification of theory and critical discussion

Drawing on the prescribed text and/or relevant academic literature, produce a paper which discusses the nature of group

Section onea in an atwood machine suppose two objects of

SECTION ONE (a) In an Atwood Machine, suppose two objects of unequal mass are hung vertically over a frictionless

Part 1you work in hr for a company that operates a factory

Part 1: You work in HR for a company that operates a factory manufacturing fiberglass. There are several hundred empl

Details on advanced accounting paperthis paper is intended

DETAILS ON ADVANCED ACCOUNTING PAPER This paper is intended for students to apply the theoretical knowledge around ac

Create a provider database and related reports and queries

Create a provider database and related reports and queries to capture contact information for potential PC component pro