#include<stdio.h>
#include<stdlib.h>
int comment1(FILE *fp)
{
char ch;
int count=0;
while(fscanf(fp,"%c",&ch)!=EOF)
{
if(ch=='\n')
{
return count;
}
count++;
}
return count;
}
int comment2(FILE *fp)
{
char ch;
int count=0;
while(fscanf(fp,"%c",&ch)!=EOF)
{
if(ch=='*')
{
fscanf(fp,"%c",&ch);
if(ch=='/')
{
return count;
}
count++;
}
count++;
}
return 0;
}
int main()
{
printf("Enter the file name:");
char s[1000],ch,ch1;
scanf("%s",s);
FILE*fp;
fp = fopen(s,"r");
int count=0;
while(fscanf(fp,"%c",&ch)!=EOF)
{
if(ch=='\"')
{
while(fscanf(fp,"%c",&ch)!=EOF)
{
if(ch=='\"')
{
break;
}
if(ch=='\\')
{
fscanf(fp,"%c",&ch);
}
}
}
else if(ch=='/')
{
fscanf(fp,"%c",&ch);
if(ch=='/')
{
count += comment1(fp);
}
else if(ch=='*')
{
count += comment2(fp);
}
}
}
printf("%d\n",count);
return 0;
}
Alice has twice as many pencils as Cara. Leon has three more pencils than Alice. The three children have a total of 58 pencils.
<h3>
What are the no. of pencils?</h3>
The no. of pencils are there totally as the 11.
Read more about the basic maths:
brainly.com/question/19493296
#SPJ1
The answer to this is Optical mouse.
The reason the answer is optical mouse is because the optical mouse is a computer mouse which uses a light source, typically a light-emitting diode, and a light detector, such as an array of photodiodes, to detect movement relative to a surface.
Hope this helped :)
have a great day
Answer:
Confederalism is not in the constitution it was adopted later.
Explanation:
The navigation keys allow you to move the cursor, move around in documents and webpages, and edit text.