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

Assignment a random mazewrite a new c program with the

Assignment (a) Random Maze Write a new C++ program with the following functionality: The program writes a greeting on the screen. Then the program displays a maze of ASCII symbols on the screen. The maze consists of 8 ro ...

Write a c program that prompts the user to enter a line of

Write a C program that prompts the user to enter a line of text (up to 50 characters). It should then convert the text entered to uppercase letters and then to lowercase letters, and then to Sentence case. Your program s ...

A compiler that translates a high-level language into

A compiler that translates a high-level language into another high-level language is called a source-to-source translator. What advantages are there to using C as a target language for a compiler?

The second portion instruction shown below which is the

The second portion (instruction shown below) which is the actual C++ program is needed by this Saturday. Write a C++ program that is menu-driven that allows for the following menu choices:Load an exam: Loading an exam sh ...

Programming assignment image processing - pointers class

Programming Assignment: Image Processing - Pointers, Class & Dynamic Data This project is called "Image Processing" which will shrink an input image, convert a color image to gray image , add random noise to an image, ad ...

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

C projectphase 11- you need to take input from user study

C project Phase 1 1- You need to take input from user study year (proper value check from 1 to 4) 2- Take input semester (proper value check 1 to 8) 3- Calculate GPA (use Loop, calculate GPA for semester 1,2,3...) Exampl ...

Bankers algorithmimplement the bankers algorithm for

Banker's Algorithm Implement the Banker's algorithm for deadlock avoidance, that works on a given set of N processes and M resource types (N The input data and result is then displayed on the screen. You may use your pro ...

Computer scienceyou have gathered your information on the

Computer Science You have gathered your information on the AI for the Tic-Tac-Toe game and began to develop your own ways to improve it using C++. Now, it's time to present your findings in a final paper. Remember that y ...

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

  • 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

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

Describe what you learned about the impact of economic

Describe what you learned about the impact of economic, social, and demographic trends affecting the US labor environmen