Select the correct option to test your answer:
Computer
Miscellaneous On Data Structures
Difficulty: Medium
What is the time complexity of the following code used to find the length of the string? #include<stdio.h> int get_len(char *s) { int len = 0; while(s[len] != '\0') len++; return len; } int main() { char *s = "lengthofstring"; int len = get_len(s); printf("%d",len); return 0; }
More Computer Questions
What does the first parameter of the main function represent?
Which of the following statements is correct about constructors in C#.NET?
To advance rightward from one cell to the next in a table, press the ________ key.
A framework in which circuit boards can he mounted is
What will be the output of the following C code? #include <stdio.h> int main() { printf("C programming %s", "Class by\n%s Shyam", "WOW"); }