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 (2265)
 C++ interview questions  C++ Interview Questions (1119)
 VC++ interview questions  VC++ Interview Questions (342)
 Delphi interview questions  Delphi Interview Questions (510)
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions (648)
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 ?    44 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 13 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 15 No
Yarmia Anuj Kalundia
 
Answer
# 4
wrong 
Is This Answer Correct ?    7 Yes 4 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 8 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 8 No
Brijesh
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
Write a C program that computes the value ex by using the formula ex =1+x/1!+x2/2!+x3+3!+.   1
m=++i&&++j(||)k++ printf("%d"i,j,k,m) ABC 1
Look at the Code: #include<string.h> void main() { char s1[]="abcd"; char s2[10]; char s3[]="efgh"; int i; clrscr(); i=strcmp(strcat(s3,ctrcpy(s2,s1))strcat(s3,"abcd")); printf("%d",i); } What will be the output? A)No output B) A Non Integer C)0 D) Garbage Accenture 6
which will be first in c compiling ,linking or compiling ,debugging. Sonata 3
what is a pointer Bank-Of-America 4
how to TOGGLE Nth bit of variable in a MACRO NDS 1
program to find the roots of a quardratic equation   1
write a string copy function routine?   2
what is the similarities between. system call and library function? Wipro 1
what would be the output of the following prog? Justify your answer? main() { unsigned char ch; unsigned char i; ch = -255; printf("%d",ch); i = -1; printf("%d",i); }   1
being a chemical engineer and with an aggregate of 80% why you opt for TCS and not your core industry? TCS 1
YBJBU6   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