Questions

Q:

Point out the error, if any, in the following program.

main()

{

    int ( *p )() = fun;

    ( *P ) ();

}

fun ()

{

    Printf ( "\nLoud and clear" );

Answer

Here we are initalising the function pointer p to the address of the function fun(). But during this initialisation the function has not been defined. Hence an error.


To eliminate this error add the prototype of the fun() before declaration of p, as shown below:


extern int fun();    or simply  int fun();

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 2206
Q:

There were 42 students in a hostel. Due to the admission of 13 new students, the expenses of the mess increase by Rs. 30 per day while the average expenditure per head diminished by Rs. 3. What was the original expenditure of the mess ?

A) Rs. 630 B) Rs. 580
C) Rs. 470 D) Rs. 690
 
Answer & Explanation Answer: A) Rs. 630

Explanation:
Report Error

View Answer Report Error Discuss

0 2206
Q:

Out of the four alternatives, choose the one which can be substituted for the given words/sentences and click the button corresponding to it.

To give money to agents for sales.

A)  Salary B)  Commission
C) Fee D) Incentive
 
Answer & Explanation Answer: B)  Commission

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: English
Exam Prep: TOEFL , GRE , CAT

0 2206
Q:

Write a c program to print multiplication table

Answer

 #include<stdio.h>
int main(){
  int r,i,j,k;
  printf("Enter the number range: ");
  scanf("%d",&r);
  for(i=1;i<=r;i++){
      for(j=1;j<=10;j++)
           printf("%d*%d=%d ",i,j,i*j);
      printf("\n");
  }
  return 0;
}

Sample Output:
Enter the number range: 5

1*1=1 1*2=2 1*3=3 1*4=4 1*5=5 1*6=6 1*7=7 1*8=8 1*9=9 1*10=10
2*1=2 2*2=4 2*3=6 2*4=8 2*5=10 2*6=12 2*7=14 2*8=16 2*9=18 2*10=20
3*1=3 3*2=6 3*3=9 3*4=12 3*5=15 3*6=18 3*7=21 3*8=24 3*9=27 3*10=30
4*1=4 4*2=8 4*3=12 4*4=16 4*5=20 4*6=24 4*7=28 4*8=32 4*9=36 4*10=40
5*1=5 5*2=10 5*3=15 5*4=20 5*5=25 5*6=30 5*7=35 5*8=40 5*9=45 5*10=50

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 2205
Q:

What does the EU do?

Answer

Execution Unit receives program instruction codes and data from BIU, executes these instructions and store the result in general registers.

Report Error

View answer Workspace Report Error Discuss

Subject: Hardware

0 2205
Q:

What's the theme of Global Aviation Summit 2019?

A) Health for all B) Journey for all
C) Ticket for all D) Flying for all
 
Answer & Explanation Answer: D) Flying for all

Explanation:
Report Error

View Answer Report Error Discuss

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

0 2205
Q:

National Housing Bank is a subsidiary of

A) State Bank of India B) Reserve Bank of India
C) Bank of India D) World Bank
 
Answer & Explanation Answer: C) Bank of India

Explanation:

National Housing Bank is a wholly subsidiary of RBI - Reserve Bank of India.

Report Error

View Answer Report Error Discuss

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

4 2205
Q:

A republic is a form of government where a state or country is

A) ruled by no one B) ruled by public
C) ruled by peoples representatives D) ruled by kings family
 
Answer & Explanation Answer: C) ruled by peoples representatives

Explanation:

A republic is a form of government where a state or country is ruled by peoples representatives. These representatives were elected by the people and must follow the rule of law under the constitution in his ruling.

Report Error

View Answer Report Error Discuss

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

3 2205