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 (2266)
 C++ interview questions  C++ Interview Questions (1121)
 VC++ interview questions  VC++ Interview Questions (342)
 Delphi interview questions  Delphi Interview Questions (510)
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions (652)
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 :: C
I also faced this Question!!     Answer Posted By  
 
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 ?    45 Yes 17 No
Don
 
Answer
# 2
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 ?    23 Yes 14 No
Sanjay
 
 
 
Answer
# 3
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 ?    18 Yes 16 No
Yarmia Anuj Kalundia
 
Answer
# 4
wrong 
Is This Answer Correct ?    7 Yes 5 No
Balachander
 
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 9 No
Salim Kumar A.p.
 
Answer
# 6
jst add basic into net salary with da n hra n pf 
Is This Answer Correct ?    2 Yes 9 No
Brijesh
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
what is diffrence between string and character array?   1
What is the relation between # and include<stdio.h> HCL 5
what is computer engg   1
write a c program to find biggest of 3 number without relational operator? Wipro 12
wat s the meaning of (int *)p +4;   2
write a own function to compare two strings with out using stringcomparition function? LG-Soft 6
what is the output of printf("%d",(scanf("%d",10));   10
how many header file is in C language ? CTS 42
write a program to display & create a rational number HCL 1
char p="data"; printf(p);   2
though sbi was nationalized why its not comes under nationalized banks and its comes under publicsector banks State-Bank-Of-India-SBI 3
what is the difference between : func (int list[], ...) or func (int *list , ....) - what is the difference if list is an array and if also if list is a pointer   2
 
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