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

int i=10; main() { extern int i; { int i=20; { const volatile unsigned i=30; printf("%d",i); } printf("%d",i); } printf("%d",i); }

1 Answers  


Sorting entire link list using selection sort and insertion sort and calculating their time complexity

1 Answers   Infosys, Microsoft, NetApp,


Write a c program to search an element in an array using recursion

1 Answers   Wipro,


programming in c lanugaue programm will errror error with two header file one as stdio.h and other one is conio.h

1 Answers  


Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it.

2 Answers   Wipro,






Write a single line c expression to delete a,b,c from aabbcc

2 Answers   Microsoft,


main() { int *ptr=(int*)malloc(sizeof(int)); *ptr=4; printf("%d",(*ptr)+++*ptr++); }

3 Answers   GNITC,


Find the largest number in a binary tree

7 Answers   Infosys,


Give a one-line C expression to test whether a number is a power of 2.

10 Answers   Microsoft,


main() { struct student { char name[30]; struct date dob; }stud; struct date { int day,month,year; }; scanf("%s%d%d%d", stud.rollno, &student.dob.day, &student.dob.month, &student.dob.year); }

1 Answers  


What is the match merge ? compare data step match merge with proc sql merge - how many types are there ? data step vs proc sql

0 Answers  


Write out a function that prints out all the permutations of a string. For example, abc would give you abc, acb, bac, bca, cab, cba. You can assume that all the characters will be unique.

5 Answers   IITR, Microsoft, Nike,


Categories