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.
#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 |
why is printf("%d %d %d",i++,--i,i--);
main() { char *p; int *q; long *r; p=q=r=0; p++; q++; r++; printf("%p...%p...%p",p,q,r); }
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?
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"
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); }
Is the following code legal? struct a { int x; struct a b; }
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
typedef struct error{int warning, error, exception;}error; main() { error g1; g1.error =1; printf("%d",g1.error); }
main() { extern i; printf("%d\n",i); { int i=20; printf("%d\n",i); } }
main() { int i=5; printf(“%d”,i=++i ==6); }
Finding a number which was log of base 2