Questions

Q:

Write a c program to create dos command type.

Answer

#include
int main( int count,char * argv[] ) {
    int i;
    FILE *ptr;
    char *str;
    char ch;
    if( count == 1) {


         printf( "The syntax of the command is incorrect.\n" );
    }
    for( i=1;i<cout;i++ ){
         ptr=fopen(argv[i],"r");
         if(ptr==NULL){
             printf("The system cannot find the file specified.");
             if(count>2)
                 printf("\nError occurred while procesing : %s.\n",argv[i]);
         }
         else {
             if(count>2) {
                 printf("%s\n\n",argv[i]);
             }
             while((ch=getc(ptr))!=-1)
                 printf("%c",ch);
         }
         fclose(ptr);
    }
    return 0;
}


 


Save the above file as open.c, compile and execute the go to command mode (current working directory) and write: open xy.c (xy.c any file present in that directory)
To run the open command in all directories and drive you will have to give the path of current working directory in command mode. Write:
C:tc\bin>PATH c:\tc\bin
Now press enter key. Now your open command will work in all directory and drive.

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 2496
Q:

Twice the difference between two numbers is equal to their sum. If one number is 15,find the other number.

 

A) 15 B) 10
C) 5 D) 20
 
Answer & Explanation Answer: C) 5

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Inventions
Exam Prep: Bank Exams

11 2496
Q:

The quotation ' Some of born great , Some achieve greatness, and some have greatness, thrust upon them ' is atributed to

A) Bertrand Russell B) Abraham Lincoln
C) William Shakeshpare D) George Orwell
 
Answer & Explanation Answer: C) William Shakeshpare

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Books and Authors

1 2495
Q:

Which country has been started world's first carbon capture plant in October 2017?

 

A) China B) Italy
C) Japan D) Iceland
 
Answer & Explanation Answer: D) Iceland

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Awareness
Exam Prep: Bank Exams

5 2495
Q:

Who invented Radar ?

Answer

Robert Watson Watt

Report Error

View answer Workspace Report Error Discuss

Subject: Inventions

1 2494
Q:

The occasional development of warm ocean surface waters along the coast of Ecuador and Peru is known as 

A) EI Nino and La Nina B) EI Nino
C) La Nina D) Southern Oscillation
 
Answer & Explanation Answer: B) EI Nino

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: World Geography

4 2494
Q:

Man has _____ pairs of salivary glands

A) 3 B) 4
C) 6 D) 8
 
Answer & Explanation Answer: A) 3

Explanation:

Salivary glands of man are 3 pairs = 6. They are one pair of parotid glands, one pair of sub-maxillary or sub-mandibular glands and one pair of sub-lingual glands.

Report Error

View Answer Report Error Discuss

Filed Under: Biology

3 2493
Q:

A sample of matter must be copper if

A) atoms in the sample react with oxygen B) the sample can conduct electricity
C) each atom in the sample has 29 protons D) the sample melts at 1768k
 
Answer & Explanation Answer: C) each atom in the sample has 29 protons

Explanation:

A sample of matter must be copper if each atom in the sample has 29 protons.

Report Error

View Answer Report Error Discuss

Filed Under: Chemistry
Exam Prep: AIEEE , Bank Exams
Job Role: Analyst , Bank Clerk , Bank PO

1 2492