guess its d drivers , since u said wen it gets outdated
I would say it is considered as science and a bit of maths as its the 'study of abstract machines and automata'
Answer:
// here is code in C.
// headers
#include <stdio.h>
// main function
int main(void) {
// variable declaration
int favorite_number;
// ask user to enter favorite number
printf("enter your favorite number : ");
// read the number
scanf("%d",&favorite_number);
// print the message
printf("your favorite number is: %d",favorite_number);
return 0;
}
Explanation:
Declare a variable "favorite_number" of integer type.Ask user to enter favorite number and assign it to favorite_number.Then print the message which include the favorite number.
Output:
enter your favorite number : 77
your favorite number is: 77
Answer:
Explanation:
The following code is written in Java and is a function/method that takes in an int array as a parameter. The type of array can be changed. The function then creates a counter and loops through each element in the array comparing each one, whenever one element is found to be a duplicate it increases the counter by 1 and moves on to the next element in the array. Finally, it prints out the number of duplicates.
public static int countDuplicate (int[] arr) {
int count = 0;
for(int i = 0; i < arr.length; i++) {
for(int j = i + 1; j < arr.length; j++) {
if(arr[i] == arr[j])
count++;
}
}
return count;
}