Concept explainers
Which of the following is not a data type?
Want to see the full answer?
Check out a sample textbook solutionChapter 2 Solutions
Computer Science: A Structured Programming Approach Using C, Third Edition
- 7Code write please. Write a program to request for three number, your program should determine: i. the largest of the number ii. the average of the numbers You NB: the numbers are of type int and Scanner must be used. b. The electoral commission of Ghana is trying to find out the eligibility of voters in the country, on a trial bases you were tasked to come out with a program that request for: i. A person's country of residence; ii. The person's age; iii. The person should be eligible to vote if he comes from Ghana and is at least 18 years of age. NB: country and age should be declared as string and float respectively, You can use either "Scanner of JOtionPane" to collect the variables bor 1 of 1 125 words DR English (United States).arrow_forwardWrite a program that reads non-negative integer number and determines whether it is odd or even or prime?arrow_forward7_. Write a program to request for three number, your program should determine: i. the largest of the number ii. the average of the numbers You NB: the numbers are of type int and Scanner must be used. b. The electoral commission of Ghana is trying to find out the eligibility of voters in the country, on a trial bases you were tasked to come out with a program that request for: i. A person's country of residence; ii. The person's age; iii. The person should be eligible to vote if he comes from Ghana and is at least 18 years of age. NB: country and age should be declared as string and float respectively, You can use either "Scanner of JOtionPane" to collect the variables bor 1 of 1 125 words DR English (United States).arrow_forward
- 1. Which is not an "unsigned" value of int type? A. 35 B. I C. -57 D. 0 E 124 2. Which statement about the char type is correct? A. It is used to host a string literal. B. It take 8 bytes. C. The range of an unsigned char is -255 to 255. 61 C+ Programming D. The range of an unsigned char is 0 to 256. E. The range of a signed char is 0 to 127. 3. The output of the following code is cout « aizeof (o.21938) « endis A. double B. 8 C. float D.0 E. 0.21938 4. The output of the following code is cout ce typeid(o.21938) .name ) « endi: A. double В. 8 C. float D. 0 E 0.21938 5. The output of the following code is enum fruits (Apple, Orange, Banana, Cherry, Tangerisel: fruits f- Bananar cout « f < endli A. 0 В. I С. 2 D. 3 E Banana 6. Which is not a legal statement for declaring a variable in C++? A. int x; x-5; B. char c= "B"; C. float f=1.26; D. bool b-false; b true; E string x-"":arrow_forwardIZVO @ ۲:۱۰ م 50 EETE2102-Electronics-... :puäillu | E هل تريد الانضمام إلى هذا الجهاز؟ الانضمام Moodle Write a program in C that accepts: 1. the radius of a sphere in a variable say radius, 2. The choice (in a character variable choice) .If the choice is a, area of sphere should be found else the volume of the sphere should be found. area of a sphere is given by the formula: area=4 x TT x radius? and the volume of the sphere is given by the formula: volume=4/3 x radius3 Note: Create/Use appropriate header files, constants and functions Sample Output 1: Enter the radius of the sphere :1 Enter choice: a for area of sphere an Volume of sphere is 4.186667arrow_forward61. State true or false: If I = read(Q) and J = read(Q) then the order of I and J does not matter. a. True b. False c. May be d. Can't sayarrow_forward
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr