C_se_coding
All the concepts need to know by programmer to become a good developer is here
24/03/2023
Basic structure of C program
22/01/2023
21/01/2023
15/12/2022
15/12/2022
Question:- What is mean by programming language? Explain the different types.
14/12/2022
Program :-
To print reverse of given number
How it works:-
Here we did initialization for
dummy----->To store the entered value(i.e 'n') as you will come to know at the end of the program
n----------->To store number given by user.
rev----->To store the reverse of a number.It is initialized to zero
x---------->To store n%10.
First of all we got a number 'n' from user and then stored it in a dummy variable called as 'dummy' for restoring the value.(remember this point).
Now the main logic comes here:-
let the number 'n' be 321 and as 321>0,while loop gets executed
then x=321%10--->which is 1.
rev=0*10+1-------->1
n=321/10--------->32
The rev for the first loop ex*****on is rev=1.
Now the number 'n' has become '32' and n>0,while loop executes for 2nd time
then x=32%10--->which is 2.
rev=1*10+2-------->12
n=32/10--------->3
The rev when loop executed second time is rev=12.
Now the number 'n' has become '3' and n>0,while loop executes for 3rd time
then x=3%10--->which is 3.
rev=12*10+3-------->123
n=3/10--------->0
The rev when loop executed third time is rev=123.
Now as the number in variable 'n' is 0 which is not n>0 then the loop terminates.Then the final reverse is '123'.
So now I hope you understood why the dummy variable is used.It is because the value in 'n' becomes 0 at the end of the program so for restoring this value to print at the end we used 'dummy'(as from the 2nd point).
Finally it prints the value in 'rev'.
13/12/2022
Getting ideas to solve a bug
Meme
11/10/2022
12 highest paying programming jobs
's
10/10/2022
Program :-
Program for the bitwise operators
Output:-
Enter your Choice
& for AND
| for OR
^ for XOR
~ for Compliment
> for Right Shift
^ Enter a and b
35
67
35 ^ 67=96
02/09/2022
Program:-
Question:
A company decides to give bonus to all its employees on new year. A 5% bonus on salary is given to male workers and 10% bonus on salary is given to female workers. write a C program to enter the salary and gender of the employees. If the salary of the employee is less than 10000, then the employee gets an extra 2% bonus on salary. Calculate the bonus that has to be given to the employee and display the salary that the employee will get?
Output:-
Enter M for Male and F for Female
M
Enter Salary
11555
Bonus=577.75
Salary=12132.75
salary
25/08/2022
Program :-
Swap two numbers using third variable
How it works?
Explanation :-
Here we initialized a,b,c
a---> for storing 1st number
b--->for storing second number
c---->for storing temporary variable
Now here goes the logic(let us take a=1 and b=3)
c=a, Therefore, c=1
a=b, Therefore a=3
b=c, Therefore b=1
Now the values of a and b are 3 and 1
The values of a and are printed.
Click here to claim your Sponsored Listing.
Category
Contact the business
Telephone
Website
Address
Mumbai
400001