# Computer Science Questions and Answers

## Recent Questions :: Computer Science

5004 QuestionsPage 6 of 501.

Description of Network and System Administration

What is network and system administration?

Asked by: Chekole Eniyew on Aug 12, 2019.

Program to Print the Perimeter of the Polygon

A program accepts n integer value and
1. print the perimeter of the polygon
2. program must print largest among the n integers.

Asked by: Mano on Aug 12, 2019.

Exception Handling Mechanism For Debugging a Program

How the exception handling mechanism can be used for debugging a program?

Asked by: Shree on Aug 6, 2019.

About Operating System

Can you display information's about the operating system?

Asked by: Gokul on Aug 5, 2019.

Write an int Function and Cube of Single int Formal Parameters

Write an int function cube that return the cube of single int formal parameters.

Asked by: Kaleb on Aug 3, 2019.

Creating an Object without a Class

Can an object be created without a class?

Asked by: Sheik Habib on Jul 28, 2019.

Hamming Code to detect Error of 10 bit Message

Error detection of 10 bit message using hamming code.

Asked by: Suhel on Jul 28, 2019.

Write a C Program to Calculate the S-score of a Given Array

The S-score of an array of integers is calculated as follows:

For each integer in the array, the S-score is 2 if the last digit or the second-last digit of the integer is 7, or 3 if both the last and second-last digits are 7, and 0 if none of those digits are 7.
Here second-last digit means the digit in the tens place.
The S-score is never more than 3
For example: 107 scores 2, 172 scores 2, 32177 scores 3, and 17322 scores 0.
The total S-score of an array is simply the sum of the S-scores of all the integers in the array
For example: the array {107, 172, 32177, 17322} will score 2+2+3+0 = 7.
If an integer does not have a second-last digit, it is assumed to be 0.

Write a function in C which calculates the S-score of a given array. The prototype of the function should be as follows:

int array_score(int a[], int len);
Here, a is the array, and len is the length of the array. The function should return the S-score of the input array.

Asked by: Aman Singh on Jul 25, 2019.

Function in C which Calculates the F-score of an Array

The F-score of an array of integers is calculated as follows:

For each integer in the array, the F-score is 2 if the last digit or the second-last digit of the integer is divisible by 4, or 3 if both the last and second-last digits are divisible by 4, and 0 if none of those digits are divisible by for.
Here second-last digit means the digit in the tens place.
The F-score is never more than 3
For example: 138 scores 2, 142 scores 2, 32148 scores 3, and 17322 scores 0.
The total F-score of an array is simply the sum of the F-scores of all the integers in the array
For example: the array {138, 142, 32148, 17322} will score 2+2+3+0 = 7.
If an integer does not have a second-last digit, it is assumed to be 0 (which is divisble by 4).

Write a function in C which calculates the F-score of a given array. The prototype of the function should be as follows:

int array_score(int a[], int len);
Here, a is the array, and len is the length of the array. The function should return the F-score of the input array.

Asked by: Rishabg on Jul 25, 2019.

Property of Data Hiding

Data hiding is an abstraction or encapsulation?

Asked by: Rohit Rock on Jun 29, 2019.