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 2881
Q:

In which of the following years, India's first Prime Minister Shri JawaharlalNehru was awarded with India's highest civilian honour BharatRatna?

A) 1955 B) 1953
C) 1951 D) 1950
 
Answer & Explanation Answer: A) 1955

Explanation:

In 1950 India's first Prime Minister Shri JawaharlalNehru was awarded with India's highest civilian honour BharatRatna.

Report Error

View Answer Report Error Discuss

Filed Under: Indian History
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Analyst , Bank Clerk , Bank PO

4 2879
Q:

Choose what replaces '?' in the following figure ?

creative111486456294.jpg image

A) Q B) O
C) M D) N
 
Answer & Explanation Answer: D) N

Explanation:

The alphabetical value of the letters in the left hand column follows through the sequence of Prime Numbers, with the letters in the right hand column representing the corresponding reverse alphabetical values. So,

M = Reverse of M = N.

Report Error

View Answer Report Error Discuss

Filed Under: Missing letters puzzles
Exam Prep: AIEEE , Bank Exams , CAT , GATE , GRE , TOEFL
Job Role: Bank Clerk , Bank PO

6 2879
Q:

Where is the Forest Reserve Institute of India located

A) Bhopal B) Dehradum
C) Lucknow D) Delhi
 
Answer & Explanation Answer: B) Dehradum

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Economy

7 2879
Q:

Granite is an example of which type of rock?

A) Sedimentary B) Igneous
C) Metamorphic D) None of the above
 
Answer & Explanation Answer: B) Igneous

Explanation:

We know that, there are three main types of rocks. They are

1. Metamorphic

2. Sedimentary (and)

3. Igneous

 

Granite_is_an_example_of1561703734.jpg image

 

Granite is an example of igneous type of rock. These type of rocks are formed through the cooling and solidification of magma and lava.

Report Error

View Answer Report Error Discuss

Filed Under: General Science
Exam Prep: AIEEE , Bank Exams , CAT , GATE
Job Role: Analyst , Bank Clerk , Bank PO

4 2878
Q:

Organisms that depend only on raw plant products are said to be 

A) herbivorous B) vegetarian
C) carnivorous D) omnivorous
 
Answer & Explanation Answer: A) herbivorous

Explanation:

Herbivorous organisms are those that take for their food, plant parts like leaves raw in contrast to vegetarian, which means that plant products are taken raw or after being cooked.

Report Error

View Answer Report Error Discuss

Filed Under: Biology

3 2878
Q:

Most highly intelligent mammals are

A) Elephants B) Kangaroos
C) Whales D) Dolphins
 
Answer & Explanation Answer: D) Dolphins

Explanation:

Dolphins are the most highly intelligent mammals.

Report Error

View Answer Report Error Discuss

Filed Under: Animals and Birds
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Analyst , Bank Clerk , Bank PO

9 2878
Q:

In the below puzzle, a word starts and ends with the same letter. Can you figure out what the word is?

_otato_

Answer

rotator

Report Error

View answer Workspace Report Error Discuss

Subject: Word Puzzles

18 2878