Ramesh’s basic salary is input through the keyboard. His
dearness allowance is 40% of basic salary, and house rent
allowance is 20% of basic salary. Write a program to calculate
his gross salary.



Ramesh’s basic salary is input through the keyboard. His dearness allowance is 40% of basic s..

Answer / sara_weapon

#include<stdio.h>
#include<conio.h>

void main()
{
int sal_amt,gro_sal;

printf("Enter your salary = ");
scanf("%d",&sal_amt);

gro_sal=sal_amt+sal_amt*0.40+sal_amt*0.20;

printf("Gross salary = %d",gro_sal);
getch();
}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Code Interview Questions

why is printf("%d %d %d",i++,--i,i--);

4 Answers   Apple, Cynity, TCS,


main() { char *p; int *q; long *r; p=q=r=0; p++; q++; r++; printf("%p...%p...%p",p,q,r); }

1 Answers  


how can u draw a rectangle in C

53 Answers   Accenture, CO, Codeblocks, Cognizant, HCL, Oracle, Punjab National Bank, SAP Labs, TCS, University, Wipro,


write a program in c language to get the value of arroy keys pressed and display the message which arrow key is pressed?

1 Answers  


pls anyone can help me to write a code to print the values in words for any value.Example:1034 to print as "one thousand and thirty four only"

2 Answers  






main ( ) { static char *s[ ] = {“black”, “white”, “yellow”, “violet”}; char **ptr[ ] = {s+3, s+2, s+1, s}, ***p; p = ptr; **++p; printf(“%s”,*--*++p + 3); }

1 Answers  


Is the following code legal? struct a { int x; struct a b; }

1 Answers  


int i; main(){ int t; for ( t=4;scanf("%d",&i)-t;printf("%d\n",i)) printf("%d--",t--); } // If the inputs are 0,1,2,3 find the o/p

2 Answers  


typedef struct error{int warning, error, exception;}error; main() { error g1; g1.error =1; printf("%d",g1.error); }

1 Answers  


main() { extern i; printf("%d\n",i); { int i=20; printf("%d\n",i); } }

1 Answers  


main() { int i=5; printf(“%d”,i=++i ==6); }

1 Answers  


Finding a number which was log of base 2

1 Answers   NetApp,


Categories