#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;
}
Answer:
1000/125 billion instructions per second.
Explanation:
All the stages take 125ps and latch time was outlooked.
The clock speed would be the highest stage time in all 5 stages. Here all are same clock speed it would be 125ps only.
throughput = 1/cycle time so ⇒ 1/125 instructions/ps
Since we want it in billion instructions per second so we have to multiply with 10⁻⁹ /10⁻¹² then the result is 1000/125 billion instructions per second.
1. Answer is B (D9=<span>A2+B3)
2. </span><span>C. identifies how many cells with data were in the range
3. </span><span>A. ascending (smallest to largest)
</span><span>4. A. the current worksheet </span>