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

Covalent bonds hold atoms together because they 

A) fill shells without giving atoms much charge B) bring electrons closer to protons
C) Both A & B D) use forces between nuclei as well as forces between electrons
 
Answer & Explanation Answer: C) Both A & B

Explanation:

Covalent bonds hold atoms together because the attraction between the positively charged nuclei and the negatively charged shared electrons is greater than the repulsions between the nuclei themselves.

Report Error

View Answer Report Error Discuss

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

0 2647
Q:

Country's first unmanned tank, rolls out from the Chennai lab. What is its name ?

A) Muntra B) Lira
C) Santra D) Myntra
 
Answer & Explanation Answer: A) Muntra

Explanation:

Defence Research and Development Organisation (DRDO) has developed an unmanned, remotely operated tank which has three variants - surveillance, mine detection and reconnaissance in areas with nuclear and bio threats. It is called Muntra. 

 
Report Error

View Answer Report Error Discuss

Filed Under: General Awareness
Exam Prep: Bank Exams , CAT
Job Role: Bank Clerk , Bank PO

8 2647
Q:

The article of the Constitution of India which deal with Directive Principles of state Policy are

A) 26 to 41 B) 30 to 45
C) 36 to 51 D) 40 to 55
 
Answer & Explanation Answer: C) 36 to 51

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Politics

2 2646
Q:

The technique of DNA fingerprinting in human was developed for first time by _________

A) Lalji Singh B) Alec Jeffreys
C) R. Ericson D) J. Black
 
Answer & Explanation Answer: B) Alec Jeffreys

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Biology

6 2646
Q:

Four pairs of words are given. Find the odd one out.

 

A) 5th June : World Environment Day B) 22nd April : Earth Day
C) 22nd March : World Water Day D) 22nd May : World Sparrow Day
 
Answer & Explanation Answer: D) 22nd May : World Sparrow Day

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Important Days and Years
Exam Prep: Bank Exams

1 2645
Q:

Improve the following code using typedef.

struct node

{

      int data1;  float data2;

       struct node *left;

       struct node *right;

};

struct node *ptr;

ptr = (struct node *) malloc (sizeof (struct node) ); 

Answer

typedef struct node * treeptr


typedef struct node


{


         int data1;


         float data2;


         treeptr *left;


         treeptr *right;


}treenode;


treeptr ptr;


ptr = ( treeptr ) malloc ( sizeof ( treenode ) );

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 2644
Q:

What part of the body controls balance?

A) Cerebrum B) Cerebellum
C) Medulla oblangata D) Amygdala
 
Answer & Explanation Answer: B) Cerebellum

Explanation:

The cerebellum is a small part of the brain positioned at the back of the head, where it meets the spine, which acts as the body's movement and balance control centre.

 

Basic-brain-anatomy1524025969.jpg image

 

It's a lot smaller than the cerebrum at only 1/8 of its size. But it's a very important part of the brain.

Report Error

View Answer Report Error Discuss

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

2 2644