Answer:
- \' is used to escape a single quote in a string enclosed in single quotes like;
my_string = 'this is John\'s ball'.
- \n is used to jump to a new line, Eg;
my_string = "Johns is a good boy\nbut he hates going to school."
the next set of the string after the '\n' character is displayed on the next line.
- \t is used to add a tab space to a string.
my_string = 'Jane is \thungry'
the character adds four character spaces before the word 'hungry'.
- \r adds a carriage return (or enter in keyboards) to start a new block paragraph in a string.
my_string = "Johns is a good boy\rbut he hates going to school."
Explanation:
Escape sequences in programming are used to format strings or output syntax of a program. They always begin with the backslash. Examples of escape sequence are " \' ", "\n", "\t", "\r", etc.
Answer:
pong i could be wrong i think its right tho
Explanation:
Troy should include a short overview of the story that his video will tell and why he wants to tell it (or what the video will be about and why). It should also include the target audience, and where the video will be published.
Answer:
Write a recursive Scheme function power(A, B) that takes two integer parameters, A and B, and returns A raised to the B power. A must be a positive value, but B maybe a negative value.
Explanation:
Answer:
d) y=x++
Explanation:
In all 3 statements:
y= ++x;
y=x=5;
y=5;
The value of y is equal to 5.
However in the statement y=x++, the value of 5 is equal to value of x prior to the increment operation. The original value of x was 4. So the value of y will be 4. Note that after the statement execution, the value of x will be updated to 5. In effect y=x++ can be visualized as a sequence of following steps:
x=4;
y=x;
x=x+1;