subject

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.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 18:00
Freya realizes she does not have enough in her bank account to use the debit card. she decides to use a credit card instead. which questions should freya answer before using a credit card? check all that apply. can i pay at least the minimum payment each month? can i make payments on time and avoid late fees? will i have to take out a loan? how much in finance charges can i afford to pay? should i talk to a consumer credit counseling service?
Answers: 1
question
Computers and Technology, 24.06.2019 16:50
Develop the program incrementally: a) start by reading and displaying each line of the input file to make sure you are reading the data set correctly. b) use the split string method to extract information from each line into a list. print the list to prove that this step is working correctly. d) convert the exam scores to type int and calculate the student’s average. display those items to prove this step is working correctly. e) create a tuple containing the six items for each student (name, exam scores, exam mean). display the tuples to prove this step is working correctly. (optionally, you may want to have the exam scores in a list so your tuple is (name, scores_list, f) append each tuple to a list. display the list to prove this step is working correctly. g) use the sort list method to re-order the tuples in the list. display the list to prove this step is working correctly. h) use a for statement to display the contents of the list as a table (with appropriate formatting). i) use a for statement to calculate the average of all scores on exam #1, then display the results. note that you could have calculated this average within the first loop, but we are explicitly requiring you to do this calculation by looping though your list of tuples. j) add the logic to calculate the average of all scores on exam #2, then display the results.
Answers: 2
question
Computers and Technology, 24.06.2019 21:40
Clunker motors inc. is recalling all vehicles in its extravagant line from model years 1999—2002 as well as all vehicles in its guzzler line from model years 2004—2007. a boolean variable named recalled has been declared. given a variable modelyear and a string modelname, write a statement that assigns true to recalled if the values of modelyear and modelname match the recall details and assigns false otherwise.
Answers: 2
question
Computers and Technology, 24.06.2019 23:30
True or false when a host gets an ip address from a dhcp server it is said to be configured manually
Answers: 1
You know the right answer?
What is the output of the following segment of C code: void flipAC(char * x, char l);
int ma...
Questions
question
Mathematics, 28.09.2021 21:20
question
Mathematics, 28.09.2021 21:20
question
Mathematics, 28.09.2021 21:20
question
History, 28.09.2021 21:20
question
Mathematics, 28.09.2021 21:20
Questions on the website: 13722363