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++

C program codeoverviewfor this assignment write a program

C++ program code Overview For this assignment, write a program that will simulate a single game of Craps. Craps is a game of chance where a player (the shooter) will roll 2 six-sided dice. The sum of the die will determi ...

Computer programming assignment-q1 using for loop write a c

Computer Programming Assignment- Q1. Using for loop, write a C++ program that prints out the multiples of 3 up through 75, separated by a blank space.  3 6 9 12 15 18 21 24 27 30 33 36 39 42 45 48 51 54 57 60 63 66 69 72 ...

Please use codeblockslist the program and the output on the

Please use codeblocks List the program and the output on the command line Eg #include #include using namespace std; int main() { floatjohno = 0.5; size_t size = 24; vector array(size); for(inti=0; i     { johno = johno + ...

Objectives- gain experience with if if else and switch

Objectives - Gain experience with if, if else, and switch statements in C programs. - Experience using % operator and true false logic. Hints This program will be MUCH easier if you design how to do the logic in your own ...

Fix a programthe program is already done and it runs welli

Fix a program The program is already done and it runs well.. I just need someone to fix it for me, the problem happens when you insert invalid day or invalid ticket type, I want you to end the program *at that point* as ...

Ipo chartinputprocessingoutputmarks for four

IPO Chart Input Processing Output Marks for four courses Processing Item: Grade Point and Grade for individual course Overall GPA Algoritham Initialize gp with zero Repeat  for (each course)                 Enter the mar ...

Discussion questonsplease respond to all of the following

Discussion Questons Please respond to all of the following prompts: • How are input and output accomplished in C++? • How do cin and cout relate to ostream and istream? Lab Activity 1. Write a C++ program per the require ...

For this program you will add and test 2 new member

For this program you will add and test 2 new member functions to the IntSLList class posted on the website. The two member functions are: insertByPosn(int el, intpos) Assuming that the positions of elements of a list beg ...

1 learner objectivesat the conclusion of this programming

1. Learner Objectives: At the conclusion of this programming assignment, participants should be able to: * Apply repetition structures within an algorithm * Construct while (), for (), or do-while () loops in C * Compose ...

This program involves using stl listsfor this program you

This program involves using STL lists. For this program you will implement three functions whose prototypes are given below: list ::iterator mxIter(list ::iterator first, list ::iterator last); void selectSort(list & aLi ...

  • 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

A cola-dispensing machine is set to dispense 9 ounces of

A cola-dispensing machine is set to dispense 9 ounces of cola per cup, with a standard deviation of 1.0 ounce. The manuf

What is marketingbullwhat is marketing think back to your

What is Marketing? • "What is marketing"? Think back to your impressions before you started this class versus how you

Question -your client david smith runs a small it

QUESTION - Your client, David Smith runs a small IT consulting business specialising in computer software and techno

Inspection of a random sample of 22 aircraft showed that 15

Inspection of a random sample of 22 aircraft showed that 15 needed repairs to fix a wiring problem that might compromise

Effective hrmquestionhow can an effective hrm system help

Effective HRM Question How can an effective HRM system help facilitate the achievement of an organization's strate