Naming rules for creating variables

Assignment Help Basic Computer Science
Reference no: EM13925142

1. Which of the following is false?

  • All elements of the array have the same data type.
  • All elements in an array have the same name.
  • All elements in an array have the same subscript.
  • The first element of the array has a subscript of zero.

2. Typically, the first item in defining a function is _____.

  • an open curly brace "{"
  • passing an argument
  • passing the function
  • naming the function

3. What is a variable's scope?

  • The length of time the variable is in existence
  • Determines who can see and access the variable
  • It is the length of time the variable is in existence, AND determines who can see and access the variable.
  • None of these

4. Float and double variables should not be used _____.

  • as counters
  • to perform mathematical calculations
  • as approximate representations of decimal numbers
  • for applications when precision is required

5. Consider the following segment of code.

if(apple != Orange)
cout<<"You got Oranges!"<else
cout<<"You got Apples";
cout<<"The end of the program is reached.";

What error can you identify?

  • A double quotation mark was incorrectly inserted.
  • You cannot compare apples to oranges.
  • Assumes indentation has a logical purpose
  • No error

6. Explain the naming rules for creating variables, and then provide three examples using the data types int, double, and char and assign values to them.

7. What is the advantage of using the conditional operator?

8. Create a C++ program that declares, initializes, and outputs the values contained in a two-dimensional array

9. Create a code segment that defines a class definition for a student. Include at least two properties and two methods. Also explain the reason why there is a public and private section associated with class definitions.

Reference no: EM13925142

Questions Cloud

What do you mean by credit risk analysis : What do you mean by credit risk analysis? Is it an art or science? Do you believe traders and manufacturers also require credit risk analysis before they extend credit to their customers? Please elaborate.
What is best way to prepare for course in computer science : What is the best way to prepare for a course in computer science, which is specifically fundamentals in web development? I will begin to take this course in the spring of 2016.
Explain the major causes of credit risk : Explain the major causes (sources) of credit risk. Is it true that non-financial institutions also have significant credit risk exposure? Please elaborate.
Corporate shareholders are exposed to unlimited liability. : Although its stockholders are insulated by limited legal liability, the legal status of the corporation does not protect the firm's managers in the same way, i.e., bondholders can sue its managers if the firm defaults on its debt, even if the defa..
Naming rules for creating variables : 6. Explain the naming rules for creating variables, and then provide three examples using the data types int, double, and char and assign values to them. 7. What is the advantage of using the conditional operator?
What constitutes a threat to a network : What is cyber warfare, What is a network and What constitutes a threat to a network?
What are the challenges of credit risk analysis : What are the challenges of credit risk analysis? What do you mean by portfolio credit risk? How does it differ from firm (or obligor) credit risk?
What do you mean by credit risk culture : What do you mean by credit risk culture? Discuss its importance. Explain the importance of credit risk appetite. What are the factors to be considered while deciding credit risk appetite?
Provide your reasoning using ethical codes of conduct : Beside each situation below, place a check by the term(s) that best reflects your opinion of the behavior of the individual. Provide your reasoning for each of your answers using both the ethical codes of conduct and the information on computer cr..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd