ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Google
   
 
Categories >> Software >> Programming Languages >> C
 
 


 

 
 C interview questions  C Interview Questions (2248)
 C++ interview questions  C++ Interview Questions (1106)
 VC++ interview questions  VC++ Interview Questions (342)
 Delphi interview questions  Delphi Interview Questions (510)
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions (644)
Question
WAP to accept basic salary of an employee?
Calculate it HRA=25%,DA=30%,PF=30%&net salary display all 
contents?
 Question Submitted By :: Don
I also faced this Question!!     Rank Answer Posted By  
 
  Re: WAP to accept basic salary of an employee? Calculate it HRA=25%,DA=30%,PF=30%&net salary display all contents?
Answer
# 1
#include<stdio.h>
void main()
{
long int bs,da,hra,pf;
printf("\nEnter The Basic Salary of Employee: ");
scanf("%d",&bs);
printf("\nDA : %d",da=bs*30/100);
printf("\nHRA : %d",hra=bs*25/100);
printf("\nPF : %d",pf=bs*30/100);
printf("\nNet Salary: %d",da+hra+pf);
}

Hey frnds pls tell me is it a ryt answer or wrong?
Help me out
 
Is This Answer Correct ?    39 Yes 16 No
Don
 
  Re: WAP to accept basic salary of an employee? Calculate it HRA=25%,DA=30%,PF=30%&net salary display all contents?
Answer
# 2
the program does not yield proper result, cos long int is
used and then only "%d", instead just use "%ld" like i did
in following
"#include<stdio.h>
void main()
{
long int bs,da,hra,pf;
printf("\nEnter The Basic Salary of Employee: ");
scanf("%ld",&bs);
printf("\nDA : %ld",da=bs*30/100);
printf("\nHRA : %ld",hra=bs*25/100);
printf("\nPF : %ld",pf=bs*30/100);
printf("\nNet Salary: %ld",da+hra+pf);
}
 
Is This Answer Correct ?    17 Yes 14 No
Yarmia Anuj Kalundia
 
 
 
  Re: WAP to accept basic salary of an employee? Calculate it HRA=25%,DA=30%,PF=30%&net salary display all contents?
Answer
# 3
wrong 
Is This Answer Correct ?    7 Yes 3 No
Balachander
 
  Re: WAP to accept basic salary of an employee? Calculate it HRA=25%,DA=30%,PF=30%&net salary display all contents?
Answer
# 4
IF UR BASIC SALARY 5000 RS.
HRA=B*25/100;
HRA=1250;
DA=BS*30/100;
DA=1500;
PF=BS*30/100;
PF=1500;
NET SALARY=HRA+DA+PF+BS;
NET SALARY=1250+1500+1500+5000;
NET SALARY= 9250 RS.
THIS IS MY CORRECT ANSWER
 
Is This Answer Correct ?    22 Yes 11 No
Sanjay
 
  Re: WAP to accept basic salary of an employee? Calculate it HRA=25%,DA=30%,PF=30%&net salary display all contents?
Answer
# 5
My question is that, my salary is Rs. 12,000/-. In my
salary, How can calculate the Basic, DA, HRA and other
conveyance allowancs. This is for the PF. Please send the
detaisl and examples to me at the earleist. Hope for the
same.

Thanks

Salim Kumar A.P.
 
Is This Answer Correct ?    8 Yes 7 No
Salim Kumar A.p.
 
  Re: WAP to accept basic salary of an employee? Calculate it HRA=25%,DA=30%,PF=30%&net salary display all contents?
Answer
# 6
jst add basic into net salary with da n hra n pf 
Is This Answer Correct ?    2 Yes 7 No
Brijesh
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
what is the advantage of using SEMAPHORES to ORDINARY VARIABLES??? NSN 2
How to find the digits truncation when assigning the interger variable to the character variables. like int i=500; char x = i : here we have truncation. how to find this. another ex: i =100; char x=i. here we do not have truncation. HCL 1
Method Overloading exist in c ? Wipro 3
#include<stdio.h> main() {int i=1;j=1; for(;;) {if(i>5) break; else j+=1; printf("\n%d",j) i+=j; } } HCL 3
do u print this format '(((())))'. This brackets is based on user input like 4 or 5 or 6,without using any loop's? Oracle 1
what are the difference between ANSI C and Let Us c and Turbo C LG-Soft 4
hello friends what do u mean by BUS ERROR i got this error while i am doing my program in DATA STRUCTURES Wipro 2
printf("%d",(printf("Hello")); What it returns? TCS 31
how to find sum of 5 digits in C?   4
What is an volatile variable? HP 14
how can you print&scan anything using just one character? :) HINT: printf,scanf similer   2
There are 21 people in a room. They have to form groups of 3 people each. How many combinations are possible? Write a C program to print the same. iGate 1
 
For more C Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com