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
natita [175]
2 years ago
11

assume that name is a variable of type stirng that has been assigned a value write an expression whose value is the last charact

er of the value of name..."blair"...'r'....
Computers and Technology
1 answer:
Snezhnost [94]2 years ago
7 0

Answer:

The most straight forward way to do it: in general string are zero index based array of characters, so you need to get the length of the string, subtract one and that will be the last character, some expressions in concrete languages would be:

In Python:

name = "blair"

name[len(name) - 1]

In JavaScript:

name = "blair"

name[name.length - 1]

In C++:

#include <string>

string name = "blair";

name[name.length() - 1];

You might be interested in
Would these statements cause an error? Why or why not? int year = 2019; int yearNext = 2020; int &amp; ref = year; &amp; ref = y
zalisa [80]

Answer: YES

Explanation:

int year=2019;

int yearNext=2020;

 int &ref=year;

<em>&ref=yearNext</em>; {This line leads to error as references cannot be reassigned}

(//compilation error: lvalue required as left operand of assignment

) lvalue(&ref) is not something which can be assigned.

To get this better, here are the difference between pointers and reference variables

Pointers

Pointers can be incremented

Array can be formed with pointers

Pointers can be reassigned

Pointer can be declared as void  

Reference variable

References cannot be incremented

Array cannot be formed with references

References cannot be reassigned as references shares the address of the variable its assigned

References can never be void

3 0
3 years ago
Now tell me how be rich like Bill Gates
Lunna [17]
Get a good education and a good job and stay focused in life
5 0
3 years ago
What are 2 plants that grow best in our soil type ​
ser-zykov [4K]

Answer:

Explanation: What type of soil?

3 0
3 years ago
Private sharing model on Opportunities. Leadership has asked the Administrator to create a new custom object that will track cus
Artemon [7]

Answer:

The answer is "Creates a profile, that permits master-detail relationship".

Explanation:

This relationship provides the relationship between parent and child when masters describe as a parent and information describes a child by which the main item controls the actions of the object of the detail.  

  • In this relationship, the main object history is destroyed, the detailed object associated with it will also be lost.
  • It lists all related information on the details page of the database, and other choices were wrong which can't be defined in the given senior.
4 0
3 years ago
Drag each tile to the correct box.
Likurg_2 [28]
Learning
planning
designing
developing
testing delivering
4 0
2 years ago
Other questions:
  • In which setting would you be least likely to find a full-time A/V technician?
    5·2 answers
  • WILL GIVE BRANLYIST
    6·1 answer
  • How do you think computers have helped improve documentation, support and services within the healthcare industry
    13·1 answer
  • Which of the following is a web app?
    5·1 answer
  • Ten examples of an interpreter
    8·1 answer
  • I ONLY HAVE 5 MIN HELPPPPPP
    15·2 answers
  • PLEASE HELP I HAVE A TEST RIGHT NOW!!!
    13·1 answer
  • Question<br> 1. Who was the first to use an abacus
    6·1 answer
  • Activity 1.1.4 What is Technology?
    10·1 answer
  • Write a one page report describing the computer the client used, who else had access to it and other relevant findings. Referenc
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!