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
IrinaVladis [17]
3 years ago
12

C programming question:

Computers and Technology
1 answer:
denpristay [2]3 years ago
6 0

Answer:

You should do this:

if (0==strcmp(modelName,"Extravagant") && modelYear >= 1999 && modelYear <= 2002)

printf("%s\n","RECALL");

Explanation:

Lets consider this program and analyze the output.

int main()

{

int modelYear;

char modelName[30];

printf("enter the year");

scanf("%d",&modelYear);

printf("enter the modelname");

scanf("%s",modelName);

if (0==strcmp(modelName,"Extravagant") && modelYear >= 1999 && modelYear <= 2002)

printf("%s\n","RECALL");    }

if (0==strcmp(modelName,"Extravagant") && modelYear >= 1999 && modelYear <= 2002)

This statement has a function strcmp  which is used to compare two strings.

If the user enters Extravagant as model name then this input will be compared by the string stored in modelName i.e. Extravagant, character by character. If the string entered by the user matches the string stored in modelName this means this part of the if condition evaluates to true. 0==strcmp means that both the strings should be equal.

The next part of the if statement checks if the model year entered is greater than or equal to 1999 AND less than or equal to 2002. This means that the model year should be between 1999 and 2002 (inclusive).

&& is the logical operator between both the parts of if statement which means that both should evaluate to true in order to display RECALL.

This is correct way to use because the if (modelName == "Extravagant" && modelYear >= 1999 && modelYear <= 2002)  printf("%s\n","RECALL"); statement will not display RECALL. After entering the model name and model year it will move to the next line and exit.

So in if (0==strcmp(modelName,"Extravagant") && modelYear >= 1999 && modelYear <= 2002)

printf("%s\n","RECALL"); statement when the if condition evaluates to true, then RECALL is displayed in the output.

You might be interested in
Windows organises information on computer using a
zhuklara [117]
The correct answer is b folder
6 0
2 years ago
Read 2 more answers
What is the software that provides the mechanisms to access a database called?
NeX [460]

Answer:

Database Management Software.

Explanation:

The software that provides  the mechanism to access the database is called  Database Management Software.There are two types databases  SQL  and  No SQL.There are various types of  database Management Software  present online for ex:-My SQL,Microsoft SQL server,Microsoft Access,Postgres SQL,Mongo DB etc.

3 0
3 years ago
Some 3d printers work by controlling the exact locations where a liquid
kow [346]
Were a liquid what? id doesn't make any sense.
6 0
3 years ago
Order the steps needed to design a relational database.
tia_tia [17]

Answer:

1. List the fields needed to gain information

2. Break down the date into smaller parts

3. identify the fields holding stored data

4.distribute the fields into tables by subject

5. identify the common fields for linking tables

Explanation:

edge 2021

5 0
3 years ago
For what purpose do the hackers create the zombies army?
enyata [817]

Answer:

A. DDoS Attacks

Explanation:

A zombie, in computer terminology, is a hacker, computer worm, trojan horse, or virus compromised internet connected computer, which can be remotely directed to perform malicious tasks

E-mail spams and denial-of-service, DoS attacks are spread and launched by botnets of zombie computers

Botnets which are also known as "zombie army", are used by hackers mainly for spam and distributed-denial-of-service, DDoS, attacks

While a DoS attack involves one machine, while a DDoS attack consist of multiple computing devices and machines

A botherder is the originator of a botnet and common botnets include Mr Black. Pushdo, and cyclone

5 0
3 years ago
Other questions:
  • Consider a file system that uses inodes to represent files. Disk blocks are 2KB in size and a pointer to a disk block requires 4
    13·1 answer
  • While Angela is making modifications to Katie’s Word document, she would like to inform Katie of the reasoning for the change. W
    10·1 answer
  • When purchasing a(n) ________ computer, having cellular as well as wifi can be important?
    9·1 answer
  • A router is a device that addresses a packet on a network to the next router along the line. Under which layer of the OSI model
    5·1 answer
  • If johanna wants to label the x- and y-axes, she should click Layout, then
    8·1 answer
  • How do you think computers have helped improve documentation, support and services within the healthcare industry
    13·1 answer
  • Travis just got promoted to network administrator after the previous administrator left rather abruptly. There are three new hir
    14·1 answer
  • Which sentence in the passage shows an effective way to protect your document from misuse? Claire has saved her research paper o
    14·1 answer
  • The fractional_part function divides the numerator by the denominator, and returns just the fractional part.
    10·1 answer
  • Which Python expression results in 49?<br><br> 7 * 2<br><br> 7^2<br><br> 7 // 2<br><br> 7 ** 2
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!