Select the correct option to test your answer:
More Computer Questions
What will be the output of the following C code? #include <stdio.h> #include <string.h> int main() { char *str = "hello, world"; char str1[9]; strncpy(str1, str, 9); printf("%s %d", str1, strlen(str1)); }
Malicious software is known as:
What will be the output of the following C++ code? #include <iostream> #include <algorithm> #include <vector> using namespace std; int main () { vector<int> first (5, 10); vector<int> second (5, 33); vector<int>::iterator it; swap_ranges(first.begin() + 1, first.end() - 1, second.begin()); cout << " first contains:"; for (it = first.begin(); it != first.end(); ++it) cout << " " << *it; cout << "\nsecond contains:"; for (it = second.begin(); it != second.end(); ++it) cout << " " << *it; return 0; }
What will be the output of the following C code? (Assuming that we have entered the value 1 in the standard input) #include <stdio.h> void main() { int ch; printf("enter a value between 1 to 2:"); scanf("%d", &ch); switch (ch) { case 1: printf("1\n"); default: printf("2\n"); } }
What is the main advantage of using a hash function that distributes values uniformly across the hash table?