Question Description
The procedure given below is required to find and replace certain characters inside an inputcharacter string supplied in array A. The characters to be replaced are supplied in array oldc,while their respective replacement characters are supplied in array newc. Array A has a fixedlength of five characters, while arrays oldc and newc contain three characters each. However, theprocedure is flawedvoid find _ and _ replace (char *A, char *oldc, char * newc ) {for (int i= 0; i <5; i++)for (int j =0; j <3; j++)if (A [i] ==oldc[ j]) A [i]= newc [j] ;}The procedure is tested with the following four test cases(1) oldc = "abc", newc = "dab" (2) oldc = "cde", newc = "bcd"(3) oldc = "bca", newc = "cda" (4) oldc = "abc", newc = "bac"Q.The tester now tests the program on all input strings of length five consisting of characters‘a’, ‘b’, ‘c’, ‘d’ and ‘e’ with duplicates allowed. If the tester carries out this testing with thefour test cases given above, how many test cases will be able to capture the flaw?a)Only oneb)Only twoc)Only threed)All fourCorrect answer is option 'B'. Can you explain this answer? for GATE 2024 is part of GATE preparation. The Question and answers have been prepared
according to
the GATE exam syllabus. Information about The procedure given below is required to find and replace certain characters inside an inputcharacter string supplied in array A. The characters to be replaced are supplied in array oldc,while their respective replacement characters are supplied in array newc. Array A has a fixedlength of five characters, while arrays oldc and newc contain three characters each. However, theprocedure is flawedvoid find _ and _ replace (char *A, char *oldc, char * newc ) {for (int i= 0; i <5; i++)for (int j =0; j <3; j++)if (A [i] ==oldc[ j]) A [i]= newc [j] ;}The procedure is tested with the following four test cases(1) oldc = "abc", newc = "dab" (2) oldc = "cde", newc = "bcd"(3) oldc = "bca", newc = "cda" (4) oldc = "abc", newc = "bac"Q.The tester now tests the program on all input strings of length five consisting of characters‘a’, ‘b’, ‘c’, ‘d’ and ‘e’ with duplicates allowed. If the tester carries out this testing with thefour test cases given above, how many test cases will be able to capture the flaw?a)Only oneb)Only twoc)Only threed)All fourCorrect answer is option 'B'. Can you explain this answer? covers all topics & solutions for GATE 2024 Exam.
Find important definitions, questions, meanings, examples, exercises and tests below for The procedure given below is required to find and replace certain characters inside an inputcharacter string supplied in array A. The characters to be replaced are supplied in array oldc,while their respective replacement characters are supplied in array newc. Array A has a fixedlength of five characters, while arrays oldc and newc contain three characters each. However, theprocedure is flawedvoid find _ and _ replace (char *A, char *oldc, char * newc ) {for (int i= 0; i <5; i++)for (int j =0; j <3; j++)if (A [i] ==oldc[ j]) A [i]= newc [j] ;}The procedure is tested with the following four test cases(1) oldc = "abc", newc = "dab" (2) oldc = "cde", newc = "bcd"(3) oldc = "bca", newc = "cda" (4) oldc = "abc", newc = "bac"Q.The tester now tests the program on all input strings of length five consisting of characters‘a’, ‘b’, ‘c’, ‘d’ and ‘e’ with duplicates allowed. If the tester carries out this testing with thefour test cases given above, how many test cases will be able to capture the flaw?a)Only oneb)Only twoc)Only threed)All fourCorrect answer is option 'B'. Can you explain this answer?.
Solutions for The procedure given below is required to find and replace certain characters inside an inputcharacter string supplied in array A. The characters to be replaced are supplied in array oldc,while their respective replacement characters are supplied in array newc. Array A has a fixedlength of five characters, while arrays oldc and newc contain three characters each. However, theprocedure is flawedvoid find _ and _ replace (char *A, char *oldc, char * newc ) {for (int i= 0; i <5; i++)for (int j =0; j <3; j++)if (A [i] ==oldc[ j]) A [i]= newc [j] ;}The procedure is tested with the following four test cases(1) oldc = "abc", newc = "dab" (2) oldc = "cde", newc = "bcd"(3) oldc = "bca", newc = "cda" (4) oldc = "abc", newc = "bac"Q.The tester now tests the program on all input strings of length five consisting of characters‘a’, ‘b’, ‘c’, ‘d’ and ‘e’ with duplicates allowed. If the tester carries out this testing with thefour test cases given above, how many test cases will be able to capture the flaw?a)Only oneb)Only twoc)Only threed)All fourCorrect answer is option 'B'. Can you explain this answer? in English & in Hindi are available as part of our courses for GATE.
Download more important topics, notes, lectures and mock test series for GATE Exam by signing up for free.
Here you can find the meaning of The procedure given below is required to find and replace certain characters inside an inputcharacter string supplied in array A. The characters to be replaced are supplied in array oldc,while their respective replacement characters are supplied in array newc. Array A has a fixedlength of five characters, while arrays oldc and newc contain three characters each. However, theprocedure is flawedvoid find _ and _ replace (char *A, char *oldc, char * newc ) {for (int i= 0; i <5; i++)for (int j =0; j <3; j++)if (A [i] ==oldc[ j]) A [i]= newc [j] ;}The procedure is tested with the following four test cases(1) oldc = "abc", newc = "dab" (2) oldc = "cde", newc = "bcd"(3) oldc = "bca", newc = "cda" (4) oldc = "abc", newc = "bac"Q.The tester now tests the program on all input strings of length five consisting of characters‘a’, ‘b’, ‘c’, ‘d’ and ‘e’ with duplicates allowed. If the tester carries out this testing with thefour test cases given above, how many test cases will be able to capture the flaw?a)Only oneb)Only twoc)Only threed)All fourCorrect answer is option 'B'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of
The procedure given below is required to find and replace certain characters inside an inputcharacter string supplied in array A. The characters to be replaced are supplied in array oldc,while their respective replacement characters are supplied in array newc. Array A has a fixedlength of five characters, while arrays oldc and newc contain three characters each. However, theprocedure is flawedvoid find _ and _ replace (char *A, char *oldc, char * newc ) {for (int i= 0; i <5; i++)for (int j =0; j <3; j++)if (A [i] ==oldc[ j]) A [i]= newc [j] ;}The procedure is tested with the following four test cases(1) oldc = "abc", newc = "dab" (2) oldc = "cde", newc = "bcd"(3) oldc = "bca", newc = "cda" (4) oldc = "abc", newc = "bac"Q.The tester now tests the program on all input strings of length five consisting of characters‘a’, ‘b’, ‘c’, ‘d’ and ‘e’ with duplicates allowed. If the tester carries out this testing with thefour test cases given above, how many test cases will be able to capture the flaw?a)Only oneb)Only twoc)Only threed)All fourCorrect answer is option 'B'. Can you explain this answer?, a detailed solution for The procedure given below is required to find and replace certain characters inside an inputcharacter string supplied in array A. The characters to be replaced are supplied in array oldc,while their respective replacement characters are supplied in array newc. Array A has a fixedlength of five characters, while arrays oldc and newc contain three characters each. However, theprocedure is flawedvoid find _ and _ replace (char *A, char *oldc, char * newc ) {for (int i= 0; i <5; i++)for (int j =0; j <3; j++)if (A [i] ==oldc[ j]) A [i]= newc [j] ;}The procedure is tested with the following four test cases(1) oldc = "abc", newc = "dab" (2) oldc = "cde", newc = "bcd"(3) oldc = "bca", newc = "cda" (4) oldc = "abc", newc = "bac"Q.The tester now tests the program on all input strings of length five consisting of characters‘a’, ‘b’, ‘c’, ‘d’ and ‘e’ with duplicates allowed. If the tester carries out this testing with thefour test cases given above, how many test cases will be able to capture the flaw?a)Only oneb)Only twoc)Only threed)All fourCorrect answer is option 'B'. Can you explain this answer? has been provided alongside types of The procedure given below is required to find and replace certain characters inside an inputcharacter string supplied in array A. The characters to be replaced are supplied in array oldc,while their respective replacement characters are supplied in array newc. Array A has a fixedlength of five characters, while arrays oldc and newc contain three characters each. However, theprocedure is flawedvoid find _ and _ replace (char *A, char *oldc, char * newc ) {for (int i= 0; i <5; i++)for (int j =0; j <3; j++)if (A [i] ==oldc[ j]) A [i]= newc [j] ;}The procedure is tested with the following four test cases(1) oldc = "abc", newc = "dab" (2) oldc = "cde", newc = "bcd"(3) oldc = "bca", newc = "cda" (4) oldc = "abc", newc = "bac"Q.The tester now tests the program on all input strings of length five consisting of characters‘a’, ‘b’, ‘c’, ‘d’ and ‘e’ with duplicates allowed. If the tester carries out this testing with thefour test cases given above, how many test cases will be able to capture the flaw?a)Only oneb)Only twoc)Only threed)All fourCorrect answer is option 'B'. Can you explain this answer? theory, EduRev gives you an
ample number of questions to practice The procedure given below is required to find and replace certain characters inside an inputcharacter string supplied in array A. The characters to be replaced are supplied in array oldc,while their respective replacement characters are supplied in array newc. Array A has a fixedlength of five characters, while arrays oldc and newc contain three characters each. However, theprocedure is flawedvoid find _ and _ replace (char *A, char *oldc, char * newc ) {for (int i= 0; i <5; i++)for (int j =0; j <3; j++)if (A [i] ==oldc[ j]) A [i]= newc [j] ;}The procedure is tested with the following four test cases(1) oldc = "abc", newc = "dab" (2) oldc = "cde", newc = "bcd"(3) oldc = "bca", newc = "cda" (4) oldc = "abc", newc = "bac"Q.The tester now tests the program on all input strings of length five consisting of characters‘a’, ‘b’, ‘c’, ‘d’ and ‘e’ with duplicates allowed. If the tester carries out this testing with thefour test cases given above, how many test cases will be able to capture the flaw?a)Only oneb)Only twoc)Only threed)All fourCorrect answer is option 'B'. Can you explain this answer? tests, examples and also practice GATE tests.