1. What is the difference between an integral variable and a floating-point variable? 2. What are the differences between an unsigned short int and a long int? 3. What would be the correct variable type in which to store the following information? a. Your age. b. The area of your backyard. c. The number of stars in the galaxy. d. The average rainfall for the month of January. 4. What happens if I assign a number with a decimal point to an integer rather than to a float? Consider the following line of code: int number = 5.4; 5. What happens if you assign a negative number to an unsigned variable? Consider the following line of code: unsigned int Number = 1; 6. Re-write the C++ codes for each of the following statements. a. n = 100 + (m++); b. n = 100 + (++m); Keep in mind that, the codes should have the same effect as the each statement. [No need to write the complete source code.] 7. a, b, c – are three variables. Write a single statement in C++ which subtract the sum of a and b from c, then increase b by 1. 8. Write a program that prints the block letter ‘G’ in a 7 X 6 grid of star as follows: * * * * * * * * *
13. Write a program that asks the user to type the price without tax of one kilogram of apples, the number of kilograms you want to buy and the tax in percent units. The program must write the total price including taxes. 14. Write a program that asks the user to type the geometric coordinate of 2 points, such as A and B (in a plane), and then writes the distance between A and B. [Hints: use ‘cmath’ or ‘math.h’ for square root function] 15. Write a program that converts centimeters to inches. [Hints: 1 cm = .393 inch.] 16. Write a program that convert any temperature from Celsius scale to Fahrenheit scale. [Hints: relation between Celsius and Fahrenheit is 5F = 9C + 32; where F is Fahrenheit and C is Celsius.] 17. Write a program for solving quadratic equations. As an example: find the values of x in the 2nd degree equation of ax2+bx+c=0. Solution of x can be found in the following format. x = -(b/2) ± [{√(b2 – 4ac)}/2]. [Hints: use ‘cmath’ or ‘math.h’ for power and square root function] 18. The acceleration of a sleigh sliding down a hill is a = g sin α , where α is the slope of the hill and the gravity acceleration g = 9.8 ms-2. Write a source code in C++ that calculates the acceleration as a function of the slope in degrees. [Hints: use ‘cmath’ or ‘math.h’ for sine function]
1. What is the difference between an integral variable ...
What happens if I assign a number with a decimal point to an integer rather than to a float? Consider the following line of code: int number = 5.4;. 5. What happens if ... Write a program that convert any temperature from Celsius scale to Fahrenheit scale. [Hints: relation between Celsius and Fahrenheit is 5F = 9C + 32; where ...
My thanks to Geert Hofstede and his colleagues and students at Rijksuniversiteit Limburg ..... tion, both perspectives attempt to address the problem of social contexts .... (Cummings, 1965), safety (Zohar, 1980), or service (Bowen & Schneider, 1988)
What is the Difference Between Internet & Digital Market ... words training institute in hyderabad _ Digital nest.pdf. What is the Difference Between Internet ...
what is the difference between data and information pdf. what is the difference between data and information pdf. Open. Extract. Open with. Sign In. Main menu.
So economics is treated as the science of growth and development.In fact, it is true that now a days people talk about ... of natural environment. Hence economics is also treated as science of Sustainable Development. .... (ii) The government should
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. L4-1 What is an ...
Explain the concept of the multi-processor systems or parallel systems? .... In Symmetric multi processing each processor run an identical copy of the OS, and.
Success and Failure Full Online ... degrees of action-no action, retreat, or normal action-if you re after big goals, you don t want to settle for the ordinary. To reach ...
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Difference Between homogeneous distributed database and heterogeneous distributed database.pdf. Difference B