how to print electricity bill according to following charges
first 100 units -1rs per unit
for next 200 units-1.50 rs per unit
without using conditions


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C Interview Questions

What is floating point exception error? And what are different types of errors occur during compile time and run time? why they occur?

1 Answers  


what is mallloc()?how it works?

4 Answers   Excel,


what are non standard function in c

0 Answers  


What is data structure in c language?

0 Answers  


why do we use pointer instead directly acessing the data?

2 Answers  






Write a program to maintain student’s record. Record should not be available to any unauthorized user. There are three (3) categories of users. Each user has its own type. It depends upon user’s type that which kind of operations user can perform. Their types and options are mentioned below: 1. Admin (Search Record [by Reg. No or Name], View All Records, Insert New Record, Modify Existing Record) 2. Super Admin (Search Record [by Reg. No or Name], View All Records, Insert New Record, Modify Existing Record, Delete Single Record) 3. Guest (Search Record [by Reg. No or Name], View All Records) When first time program runs, it asks to create accounts. Each user type has only 1 account (which means that there can be maximum 3 accounts). In account creation, following options are required: Login Name: <6-10 alphabets long, should be unique> Password: <6-10 alphabets long, should not display characters when user type> Confirm Password: <must match with the Password, should not display characters when user type> Account Type: <One character long, A or S or G where A for Admin, S for Super Admin, G for Guest> Login Name, Password and Account Type should be stored in a separate file in encrypted form. (Encryption means that actual information should be changed and Decryption means that Encrypted information is changed back to the actual information) If any of the above mentioned requirement(s) does not meet then point out mistake and ask user to specify information again. When Program is launched with already created accounts, it will ask for user name and password to authenticate. On successful authentication, give options according to the user’s type.

0 Answers  


What is Memory leakage ?

2 Answers   HCL,


what is the function of void main()?

8 Answers  


writ a program to compare using strcmp VIVA and viva with its output.

0 Answers  


What are the advantages of external class?

0 Answers  


Write a program to compute the similarity between two strings - The program should get the two strings as input - Then it will output one single number which is the percentage of similarity between the two strings

0 Answers  


what is the difference between getch() and getche()?

7 Answers   Infosys,


Categories