#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:
2
Explanation:
The second option is the only one that will work. The last would work but doesn't make the code any shorter.
Answer:
C) Project and Form
Explanation:
In saving a Visual Basic project properly, the following: two components part that is involved are:
1. Project - this is the project file that will be saved in the computer's memory. On the toolbar of a Visual Basic Editor, there is a "Save Project File" icon, which will be clicked to save a Project file.
2. File - the is the Visual Basic Editor's user interface. Just like "window" in Microsoft Office, it is the space used in writing or building the project file.
Answer:
Use pelican, or similar heavy duty cases
Explanation:
Pelican is a brand btw. 10/10 would recommend