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 |
What is the main difference between STRUCTURE and UNION?
Write a C program to add two numbers before the main function is called.
/*what is the output for*/ void main() { int r; printf("Naveen"); r=printf(); getch(); }
Is the following code legal? typedef struct a { int x; aType *b; }aType
write a program to Insert in a sorted list
Write a C program that defines a 2-dimentional integer array called A [50][50]. Then the elements of this array should randomly be initialized either to 1 or 0. The program should then print out all the elements in the diagonal (i.e. a[0][0], a[1][1],a[2][2], a[3][3], ……..a[49][49]). Finally, print out how many zeros and ones in the diagonal.
main(int argc, char *argv[]) { (main && argc) ? main(argc-1, NULL) : return 0; } a. Runtime error. b. Compile error. Illegal syntax c. Gets into Infinite loop d. None of the above
int i,j; for(i=0;i<=10;i++) { j+=5; assert(i<5); }
main() { int i=5,j=10; i=i&=j&&10; printf("%d %d",i,j); }
How do I write a program to print proper subset of given string . Eg :input: abc output:{},{a},{b},{c},{a,b},{a,c},{b,c}, {a,b,c}.I desperately need this program please mail me to saravana6m@gmail.com
main() { char c; int i = 456; clrscr(); c = i; printf("%d", c); } a. 456 b. -456 c. random number d. none of the above
source code for delete data in array for c