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 |
#define a 10 int main() { printf("%d..",a); foo(); printf("%d..",a); return 0; } void foo() { #undef a #define a 50 }
write a c program to Create employee record by taking details like name, employee id, address and phone number. While taking the phone number, take either landline or mobile number. Ensure that the phone numbers of the employee are unique. Also display all the details
program to Reverse a linked list
12 Answers Aricent, Microsoft, Ness Technologies,
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
Is there any difference between the two declarations, 1. int foo(int *arr[]) and 2. int foo(int *arr[2])
Write a C function to search a number in the given list of numbers. donot use printf and scanf
#include<stdio.h> int main() { int a=3,post,pre; post= a++ * a++ * a++; a=3; pre= ++a * ++a * ++a; printf("post=%d pre=%d",post,pre); return 0; }
main() { unsigned int i=10; while(i-->=0) printf("%u ",i); }
given integer number,write a program that displays the number as follows: First line :all digits second line : all except the first digit . . . . Last line : the last digit
/*what is the output for*/ void main() { int r; printf("Naveen"); r=printf(); getch(); }
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.
C program to print magic square of order n where n > 3 and n is odd