Select the correct option to test your answer:
More Computer Questions
What does the 'strcmp' function in C do?
. . . . . . . . package provides basic functionalities in R environment like arithmetic calculations, input/output.
File extensions are used in order to
What is the output of the following code? #include<stdio.h> #include<stdlib.h> struct Node { int val; struct Node* next; }*head; int get_max() { struct Node* temp = head->next; int max_num = temp->val; while(temp != 0) { if(temp->val > max_num) max_num = temp->val; temp = temp->next; } return max_num; } int get_min() { struct Node* temp = head->next; int min_num = temp->val; while(temp != 0) { if(temp->val < min_num) min_num = temp->val; temp = temp->next; } return min_num; } int main() { int i, n = 9, arr[9] ={8,3,3,4,5,2,5,6,7}; struct Node *temp, *newNode; head = (struct Node*)malloc(sizeof(struct Node)); head -> next =0; temp = head; for(i=0;i<n;i++) { newNode =(struct Node*)malloc(sizeof(struct Node)); newNode->next = 0; newNode->val = arr[i]; temp->next =newNode; temp = temp->next; } int max_num = get_max(); int min_num = get_min(); printf("%d %d",max_num,min_num); return 0; }
What is the data type of the value 3.14 in Ruby?