Home / MCQ Bank / Computer
Computer Parsing, Benchmarking And Logging

How to calculate the run time of a code?

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option B • End time – Start time

Related Computer Questions

What is the space complexity of the following recursive implementation? #include<stdio.h> #include<limits.h> int max_of_two(int a, int b) { if(a > b) return a; return b; } int rod_cut(int *prices, int len) { int max_price = INT_MIN; // INT_MIN is the min value an integer can take int i; if(len <= 0 ) return 0; for(i = 0; i < len; i++) // subtract 1 because index starts from 0 max_price = max_of_two(max_price, prices[i] + rod_cut(prices,len - i - 1)); return max_price; } int main() { int prices[]={2, 5, 6, 9, 9, 17, 17, 18, 20, 22},len_of_rod = 10; int ans = rod_cut(prices, len_of_rod); printf("%d",ans); return 0; } Which of the following property is used to control column element breaks after an associated element when flowing multicolumn text? What will be the output of the following C code? #include <stdio.h> #define Cprog int main() { int a = 2; #ifdef Cprog a = 1; printf("%d", Cprog); } What will be the output of the following Java program? import java.lang.System; class Output { public static void main(String args[]) { byte a[] = { 65, 66, 67, 68, 69, 70 }; byte b[] = { 71, 72, 73, 74, 75, 76 }; System.arraycopy(a, 2, b, 3, a.length - 4); System.out.print(new String(a) + " " + new String(b)); } } Pick out the correct method in the c++ standard library algorithm.