Computers and Technology

What is the output of the following segment of C code: void flipAC(char * x, char l);
int main () {
char * text;
text="This is some sample text.";
flipAC(text, 'e');
printf("%s", text);
return 0;
}
void flipAC(char * x, char l) {
int length=strlen(x);
char temp;
char *e = &x[length-1];
char *p = strchr(x, l) + 1;
while (e != p) {
temp = *p;
*p = *e;
*e = temp;
p++;
e--;
}
}
a) This is somE samplE tExt.
b) .txet elpmas emos si sihT
c) This is some. txet elpmas
d) mos si sihTe sample text.

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 19:10, gummybear1398
Select the correct answer. emma, the quality control manager in a software development company, asks the testing team to check whether the user interface is friendly. to which type of testing is emma referring? a. usability testing b. data comparison c. validation testing d. stress testing e. destruction testing
Answers: 1
image
Computers and Technology, 22.06.2019 17:00, joshualoz5414
Acase study allows a more detailed look at the life of a single subject than any other study.
Answers: 3
image
Computers and Technology, 22.06.2019 22:10, Metlife
Asequential circuit contains a register of four flip-flops. initially a binary number n (0000 ≤ n ≤ 1100) is stored in the flip-flops. after a single clock pulse is applied to the circuit, the register should contain n + 0011. in other words, the function of the sequential circuit is to add 3 to the contents of a 4-bit register. design and implement this circuit using j-k flip-flops.
Answers: 1
image
Computers and Technology, 23.06.2019 06:00, 573589
What machine listens for http requests to come in to a website’s domain? a. a router b. a browser c. a server d. a uniform resource locator
Answers: 1
Do you know the correct answer?
What is the output of the following segment of C code: void flipAC(char * x, char l);
int ma...

Questions in other subjects: