Question 5: The following program transforms a string by converting lowercase letters to uppercase and replacing vowels with ‘#’. It also counts the times the letter ‘g’ appears in a string. Fill in the missing parts to complete the code logic. #include #include int gcounts(char str) { char *p = str; // Question a) while ( ___________ ) { // Question b) if (*p >= ‘a’ && *p max_g) { max_g = g_count; max_index = i; } } if (max_index != -1) { printf(“\nString with the most ‘g’s: %s\n”, courses); printf(“Index: %d, ‘g’ count: %d\n”, max_index, max_g); } return 0; } f) In part (e) Can you use sizeof() instead of strlen()?Y/N and why?
Question 2: Trace and determine the output of the following…
Question 2: Trace and determine the output of the following program. Justify your answer by explaining the code with comments. #include int main() { int x, y, z, w, v; int *p1, *p2; p1 = &x; *p1 = 2; p2 = &y; *p2 = *p1 * 3; //Add your comment: p1 = &z; //Add your comment: *p1 = *p2 – *(&x); //Add your comment: p2 = &w; //Add your comment: *p2 = *(&z) + *(&y); //Add your comment: p1 = &v; //Add your comment: *p1 = *(&w) – *(&z) + *(&x); //Add your comment: printf(“%d %d %d %d %d\n”, x, y, z, w, v); return 0; }
What does the security objective of “Integrity” refer to?
What does the security objective of “Integrity” refer to?
Software security is a:
Software security is a:
What does the acronym “CIA” stand for in the context of info…
What does the acronym “CIA” stand for in the context of information security?
Which of the following is NOT one of the values of the Agile…
Which of the following is NOT one of the values of the Agile Manifesto?
What kind of relationship between classes does the following…
What kind of relationship between classes does the following symbol represent in UML Class Diagrams:
Which of the following is an example of non-functional requi…
Which of the following is an example of non-functional requirements in a banking system?
Which of the following is primarily a method of authenticati…
Which of the following is primarily a method of authentication?
Which of the following statements is true regarding the Loan…
Which of the following statements is true regarding the Loan class?