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
iren [92.7K]
3 years ago
14

Write an expression whose value is the string that consists of the first four characters of string s.

Computers and Technology
1 answer:
Ipatiy [6.2K]3 years ago
8 0

Answer:

The correct expression for the following question is :s[0 : 4]

Explanation:

The string is the collection of characters It terminated by the NULL character in the c programming language. The s[0 : 4] expression holds the first four characters of string s. In the expression it starts to the position "0" and goes to the index value "4"  .in this string it holds the value up to the four characters.

We can store the four-character in the string:s[0 : 4].

You might be interested in
Technology is often discovered by accident
polet [3.4K]

true. mots technology was found be accident

5 0
3 years ago
Greg works outside. He is often found cutting grass and making the local park grounds look nice for guests.
kvasek [131]

Answer:

C Landscaper

Explanation:

From what I know about landscapers and from the description that makes the most sense.

3 0
3 years ago
Five year ago, Amit was three times as old as Arman. Ten years later Amit would be twice as old as Arman. How old is Arman now? 
RideAnS [48]
Answer: 50
Explanation: let amit's current age = a and armaan's current age be b.
(a-5) = 3* (b-5)
i.e. a= 3b-10 -(i)
10 years later,
(a+10) = 2(b+10)
i.e. a=2b+10 -(ii)
From eqn (i) and (ii),
b=20,
and a=50
8 0
3 years ago
Read 2 more answers
Write code which takes a sentence as an input from the user and then prints the length of the first word in that sentence.
Afina-wow [57]

import java.util.Scanner;

public class U2_L3_Activity_Four {

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       System.out.println("Enter a sentence.");

       String sent = scan.nextLine();

       int count = 0;

       for (int i = 0; i < sent.length(); i++){

           char c = sent.charAt(i);

           if (c != ' '){

               count++;

       }

           else{

               break;

           }

       

   }

       System.out.println("The first word is " + count +" letters long");

   

   }

}

We check to see when the first space occurs in our string and we add one to our count variable for every letter before that. I hope this helps!

7 0
3 years ago
Your computer uses 4 bits to represent decimal numbers (0, 1, 2, 3 and so on) in binary. What is the SMALLEST number for which a
natali 33 [55]
2 I think because 2 I think is binary I’m sorry if this is wrong
8 0
3 years ago
Other questions:
  • ____ are systems in which queues of objects are waiting to be served by various servers
    5·1 answer
  • Which is the correct process for attaching a file?
    12·1 answer
  • The flynn effect best illustrates that the process of intelligence testing requires up-to-date ________
    14·1 answer
  • Write a program that lets a maker of chips and salsa keep track of sales for five different types of salsa: mild, medium, sweet,
    14·1 answer
  • 6. Python indexes lists beginning with the number 1.<br> True<br><br> False
    15·1 answer
  • Whats the formatting of a letter to the editor?​
    12·1 answer
  • Is there any difference beetween the old version of spyro released on the origional and the newer ones??? or is it only change i
    8·1 answer
  • The function below takes two arguments: a string (name) and an integer (position). Complete the function so that it prints out t
    7·1 answer
  • Software that converts program written in other language into machine language​
    11·1 answer
  • What service determines which resources a user can access along with the operations that a user can perform?.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!