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
Natali5045456 [20]
3 years ago
5

In a working C program, the string literal "CBC" can be assinged to the variable word as follows without causing a compile error

. char word[3]a. true.b. false
Computers and Technology
1 answer:
Radda [10]3 years ago
7 0

Answer:

false

Explanation:

string literal cannot be be assigned to a fixed length char array. however, it can be assigned using a char* e.g:

char* word =(char*) "CCA\0";

You might be interested in
Your Windows PC has an AMD processor installed that includes AMD-V technology and the motherboard fully supports this processor.
Ray Of Light [21]

Answer:

Microsoft Hyper-V Server

Explanation:

3 0
4 years ago
The largest type of computer system with the most extensive storage capacity and the fastest processing speeds is a ________.
azamat
Super Computer. Hope I helped.
5 0
3 years ago
What is the definition for Types of Resource-Community Resources??​
exis [7]
Typically, when someone refers to a community resource, they mean an organization that serves a particular geographical area or group of people by providing tools to help that community grow in positive ways and improve the quality of life for the people of that community.
4 0
3 years ago
Create union integer with members char c, short s, int i and long b. Write a program that inputs the values of type char, short,
Tom [10]

Answer:

The updated program in C is as follows:

#include <stdio.h>

union myUnion{ char c; short s; int i; long l; };

int main(){

   union myUnion inputs;

   printf("Character: ");    scanf("%c", &inputs.c);

   printf("Output: %c", inputs.c);

   printf("\nShort: ");    scanf("%hd", &inputs.s);

   printf("Short: %hd", inputs.s);

   printf("\nInteger: ");    scanf("%d", &inputs.i);

   printf("Output: %d", inputs.i);

   printf("\nLong: ");    scanf("%ld", &inputs.l);

   printf("Long: %ld", inputs.l);

   return 0;

   }

The pseudocode is as follows:

Function union myUnion {

character; short; int; long

}

main() {

myUnion inputs;

Input inputs.c;  Print inputs.c

Input inputs.s; Print inputs.s

Input inputs.i; Print inputs.i;

Input inputs.l; Print inputs.l

}

Explanation:

This defines the union function

<em>union myUnion{ char c; short s; int i; long l; };</em>

The main begins here

int main(){

This calls the union function to main

   union myUnion inputs;

This prompts and gets input for character variable

   printf("Character: ");    scanf("%c", &inputs.c);

This prints the character input

   printf("Output: %c", inputs.c);

This prompts and gets input for short variable

   printf("\nShort: ");    scanf("%hd", &inputs.s);

This prints the short input

   printf("Short: %hd", inputs.s);

This prompts and gets input for integer variable

   printf("\nInteger: ");    scanf("%d", &inputs.i);

This prints the integer input

   printf("Output: %d", inputs.i);

This prompts and gets input for long variable

   printf("\nLong: ");    scanf("%ld", &inputs.l);

This prints the long input

   printf("Long: %ld", inputs.l);

   return 0;

   }

5 0
3 years ago
Write a generic C++ function that takes an array of genericelements and a scalar of the same type as the array elements. Thetype
siniylev [52]

Answer:

Explanation:

Here is the code

#include<iostream>

using namespace std;

template <class myType>

int generic(myType *a, myType b)

{

int i;

for(i=0;a[i]!=-1;i++)

{

       if( b == a[i])

       return i;

}

return -1;

}

int main()

{

int a[]={1,2,3,4,5,6,7,8,-1};

float b[]={1.1,2.1,3.1,4.1 ,5.1,6.1,7.1,-1};

if(generic(a,5)>0)

       {

       cout<<" 5 is foundin int at index "<<generic(a,5)<<endl;

       }

       else

       {

       cout<<" 5 notfound "<<endl;

       }

if(generic(b,(float)5.1)>0)

       {

       cout<<" 5.1 isfound in float at index "<<generic(a,5)<<endl;

       }

       else

       {

       cout<<" 5.1 notfound "<<endl;

       }

system("pause");

}

/*

sample output

5 is found in int at index 4

5.1 is found in float at index 4

*/

7 0
3 years ago
Other questions:
  • Write in general about ergonomic injuries and also mention the symptoms that computer users exhibit when they experience these s
    11·2 answers
  • Which of the following operating systems is open source?
    6·2 answers
  • When a switch is closed, completing an lr series circuit, the time needed for the current to reach one half its maximum value is
    14·1 answer
  • 3. Do some Internet research on the use of VLANs in hospitals. Summarize the benefits of using VLANs in hospitals and identify e
    14·2 answers
  • Just five types of pointing device,list
    13·1 answer
  • 1.Can ICTs be innovatively used in the absence of minimum literacy levels among the poor?
    5·1 answer
  • Suppose that you are asked to modify the Stack class to add a new operation max() that returns the current maximum of the stack
    8·1 answer
  • How would you reply to an email message you've received that has multiple recipients, all of whom you would like to see your rep
    6·2 answers
  • StreamPal is an audio-streaming application for mobile devices that allows users to listen to streaming music and connect with o
    6·1 answer
  • What term refers to a hacker that uses
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!