1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
irakobra [83]
3 years ago
6

. Which of the following is NOT a valid declaration for a character string?

Computers and Technology
1 answer:
melomori [17]3 years ago
4 0

Answer:

a) char string1[3] = {“1”, “2”, ‘3’, 4}

Explanation:

From the given options the option a is not a valid declaration.

We are declaring an array of characters string1 also known as c string.Whose size is 3.So it can only hold 3 characters and the third character should be Null(\0) character and we are providing it 4 elements from which 2 of them are strings,one is character and an integer 4.

You might be interested in
write a c++ program that reads from the user a positive integer (in a decimal representation), and prints its binary (base 2) re
Vesna [10]

Answer:

The program to this question can be described as follows:

Program:

#include <iostream> //defining header file

using namespace std;

int main() //defining main method

{

int x1,rem,i=1; //defining integer variable

long Num=0;// defining long variable

cout << "Input a decimal number: "; // print message

cin >> x1; //input value by user

while (x1!=0) //loop for calculate binary number

{

//calculating binary value    

rem= x1%2;

x1=x1/2;

Num =Num +rem*i;//holding calculate value

i=i*10;

}

cout <<Num;//print value

return 0;

}

Output:

Input a decimal number: 76

1001100

Explanation:

In the above code, four variable "x1, rem, i, and Num" is declared, in which three "x1, rem, and i" is an integer variable, and one "Num" is a long variable.

  • In the x1 variable, we take input by the user and use the while loop to calculate its binary number.
  • In the loop, first, we check x1 variable value is not equal to 0, inside we calculate it binary number that store in long "Num" variable, after calculating its binary number the print method "cout" is used to prints its value.  
5 0
3 years ago
A product/process is referred to as a Key Technology during which of the following phases of the technology development cycle?
Galina-37 [17]
The answer is C. Mature phase.
3 0
3 years ago
Read 2 more answers
How frequently should computers containing ehr information be backed up?
geniusboy [140]
Explain what is meant by a limited data set and how this HIPAA rule may affect medical assistants
7 0
3 years ago
Describe how you would conduct a search for a single record.
Anastasy [175]
Er..... i do not know the answer to this
8 0
3 years ago
How to remove duplicates from list in python?
kondaur [170]
<span> the new way of </span>removing duplicates<span> from an iterable while keeping it in the original order </span>
5 0
3 years ago
Read 2 more answers
Other questions:
  • Hope has now created her sublist. 1. Oxygen a. Helps living things produce energy b. Helps protect living things from harmful ra
    15·1 answer
  • Look at the graph below. Which statement is TRUE based on the graph of an egg drop experiment?
    10·1 answer
  • Write a function called median, that takes as parameter a full, sorted array of doubles and returns the median of the list. For
    15·1 answer
  • Media messages are communicated through which of the following:
    8·2 answers
  • Which of the following attributes of a website indicates a more reliable source for information?
    8·1 answer
  • What term refers to a device or software system that collects environmental information and makes independent decisions.
    6·1 answer
  • What is sun and what does it do?
    12·2 answers
  • कम्प्यूटर में एक समस्या को ठीक करने के लिए एक कार्यक्रम या कोनफीगरेशन परिवर्तन के बाद किए जाते हैं
    5·1 answer
  • When you purchase donuts, they come in boxes of 12, so 24 donuts take 2 boxes. All donuts need to be in a box, so if you buy 13
    10·1 answer
  • What information will she need to know in order to obtain assistance from the chief medical officer to reduce the number of deli
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!