Answer:
See explaination
Explanation:
#include <stdio.h>
#include <stdlib.h>
int main()
{
FILE * file_object;
char file_name[100];
char ch;
int characters=0, words=0;
printf("Enter source file name: ");
scanf("%s", file_name); //asking user to enter the file name
file_object = fopen(file_name, "r"); //open file in read mode
if (file_object == NULL)
{
printf("\nUnable to open file.file not exist\n"); //check if the file is present or not
}
while ((ch = fgetc(file_object)) != EOF) //read each character till the end of the file
{
if (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\0') //if character is space or tab or new line or null character increment word count
words++;
else
characters++; //else increment character count this assures that there is no spaces count
}
printf("The file story.txt has the following Statistics:\n"); //finally print the final statistics
if (characters > 0)
{
printf("Words: %d\n", words+1); //for last word purpose just increment the count of words
printf("Characters (no spaces): %d\n", characters);
}
fclose(file_object); //close the file object
return 0;
}
Answer:- Major property of a good hash code is that objects which are equal should return the same hash code .
Explanation: Hash codes is a numeric value which is used for identify a object while a equality testing .Hash code can occupy the value of any length and then returns a fixed length value. The value of hash codes are variable.
If two objects are equal then by the method of equal(object) if the hashcode() function is called on both the objects , they produce the same value.
install memory requires you to take off the bottom portion of the laptop.
Answer: Arial belongs to the sans serif family of typefaces. It is the most commonly used typeface, and it is the default typeface set in Microsoft Word. A character is a typographic element represented through an upper- or lowercase letter, number, or special character. Every letter of the alphabet has multiple parts that we describe with a particular set of terms. Typographers call this “letter anatomy.” The basic terms common to all letters are below:
An ascender is the stroke extending upward, going above the x-height (which is the height of the letter excluding the ascender or descender).
A descender is the stroke extending downward from the baseline (which is the imaginary horizontal line that aligns the bodies of the characters).
A bar is the horizontal stroke in the uppercase letters A, E, F, H, I, and T, as well as in the lowercase letters e, f, and t.
A counter is the blank space within the body stroke.
A bowl is a curved stroke that surrounds the counter.
A shoulder is a curved stroke beginning at the stem.
A serif is the tapered feature at the end of a stroke. Arial is a sans serif font, and it does not have tapered corners at the ends of the main strokes.
Answer:
Following are the response to the given question:
Explanation:
The glamorous objective is to examine the items (as being the most valuable and "cheapest" items are chosen) while no item is selectable - in other words, the loading can be reached.
Assume that such a strategy also isn't optimum, this is that there is the set of items not including one of the selfish strategy items (say, i-th item), but instead a heavy, less valuable item j, with j > i and is optimal.
As
, the i-th item may be substituted by the j-th item, as well as the overall load is still sustainable. Moreover, because
and this strategy is better, our total profit has dropped. Contradiction.