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:
<u><em>please mark brainliest!</em></u>
Explanation:
Benjamin Franklin found and acquainted power (electricity) with the USA. He likewise had numerous different developments such the wood stove. Benjamin Franklin initially stunned himself in 1746, while leading examinations on power with discovered items from around his home. After six years and precisely 261 years back today, the establishing father flew a kite joined to a key and a silk lace in a storm and adequately caught lightning in a jug.
Answer:
B. The process will be terminated by the operating system.
Explanation:
When Round Robin is used for CPU scheduling, a time scheduler which is a component of the operating system is used in regulating the operation. A time limit is set for each of the processes to be run.
So, when a process fails to complete running before its time elapses, the time scheduler would log it off and return it to the queue. This queue is in a circular form and gives each of the processes a chance to run its course.
Answer: Constructors can specify parameters but not return types.
Explanation:
public class Student {
int roll_no;
public Student(int a) {
roll_no = a;
}
public static void main(String[] args) {
Student abs = new Student(10);
System.out.println(abc.roll_no);
}
}
In the above code we have illustrated the working of constructors. We have a class with the name Student. then a constructor is created of the class called as the class constructor. In the main we create an object of the class and with this object we invoke the constructor and also pass a parameter. Here in the code we are passing the roll no of the student.
So we can say that constructor is called during the runtime when the object created invokes the constructor so a constructor can have many arguments but it does not have a return type.