Paper Measurement(Convert ream to sheets)

1 ream contains 500 sheets of paper

C Program
#include <stdio.h>
#include <stdlib.h>
int main()
{
    int s,r;
    printf("Enter total ream of paper:");
    scanf("%d",&r);
    s=r*500;
    printf("Total sheets of paper in %d ream is %d",r,s);
    return 0;
}


Java Program
import java.util.Scanner;

public class PaperMeasurement {

	public static void main(String[] args) 
	{
		Scanner S = new Scanner(System.in);
		int s,r;
		System.out.print("Enter total ream of paper:");
	    r= S.nextInt();
		s=r*500;
		System.out.print("Total sheets of paper in " +r + " ream is " + s);
	}

}

Caculate Profit

Profit is calculated by subtracting cost price from selling price.
That is, Profit = SellingPrice - CostPrice

C Program
#include <stdio.h>
#include <stdlib.h>
int main()
{
    int p,cp,sp;
    printf("Enter Cost Price:");
    scanf("%d",&cp);
    printf("Enter Selling Price:");
    scanf("%d",&sp);
     p=sp-cp;
    printf("Profit from the item is %d",p);
    return 0;
}


Java Program
import java.util.Scanner;

public class Profit {

	public static void main(String[] args) 
	{
		Scanner S = new Scanner(System.in);
		int p,cp,sp;
	    System.out.print("Enter cost Price:");
	    cp = S.nextInt();
	    System.out.print("Enter Selling Price:");
	    sp=S.nextInt();
	     p=sp-cp;
	    System.out.print("Profit from the item is " + p);
	  
	}

}

WorkDone(W=F*N)

C Program
#include <stdio.h>
#include <stdlib.h>
int main()
{
    int w,f,d;
    printf("Enter Force(N): ");
    scanf("%d",&f);
    printf("Enter Distance travelled  by the body(m): ");
     scanf("%d",&d);
    w=f*d;
    printf("The work done is %d Joules",w);
    return 0;
}


Java Program
import java.util.Scanner;

public class WordDone {

	public static void main(String[] args) 
	{
		Scanner S = new Scanner(System.in);
		 int w,f,d;
		    System.out.print("Enter Force(N):");
		    f= S.nextInt();
		    System.out.print("Enter Distance travelled  by the body(m): ");
		    d= S.nextInt();
		    w=f*d;
		    System.out.print("The work done is "+ w + "Joules");
	  
	}

}
Python Program
f = int(input("Enter total force applied: "))
d = int(input("Enter distance displaced: "))
w = f * d
print("Total work done is : " +  str(w))

OHMS LAW(V=IR)

Ohm’s law explains the relationship between voltage and current flowing through resistors. The mathematical formula is V=IR.

C Program
#include <stdio.h>
#include <stdlib.h>
int main()
{
    int v,i,r;
    printf("Enter current(Amphere):");
    scanf("%d",&i);
    printf("Enter Resistance(Ohm):");
    scanf("%d",&r);
     v=i*r;
    printf("Voltage of the circuit is %d",v);
    return 0;
}


Java Program
import java.util.Scanner;

public class Swap {

	public static void main(String[] args) 
	{
		Scanner s = new Scanner(System.in);
		int v,i,r;
		 System.out.print("current(Amphere):");
		i = s.nextInt();
	     System.out.print("Enter Resistance(Ohm):");
		r = s.nextInt();
		v=i*r;
		System.out.print("Voltage of the circuit is " + v);   
	}
}



Python Program
i = int(input("Enter value of current in amphere: "))
R = int(input("Enter value of Resistance in ohm: "))
v = i*R
print("The voltage(V) applied is: " + str(v))

What is Electronics?




Electronics is the branch of science and engineering which deals with the study of behavior and movement of electrons in different materials. It can also be defined as the engineering branch, which is concerned with the design of electronic circuits using different electronic components like chips, transistor, semiconductor, resistors and etc. Electronics is a vast subject and hence there are many branches of electronics. Electronic also has a wide range of applications. We shall also look at some jobs for Electronics engineers.

Branches of Electronics:

  • Digital electronics:
  • This branch is concerned with usage of Boolean logic and discrete signal electronics for design of electronic componenets. Eg: Computers, digital cameras.

  • Analog electronics:
  • This branch is concerned with analysis of electrical signals and relationship between signal and current or voltage. Eg: radio and audio equipment

  • Micro electronics(Integrated circuits) :
  • As the word micro means small this branch is concerned with design of electronic components using materials like resistors, capacitors etc. Eg: chips, motherboards,etc.

  • Nano electronics:
  • This branch usually refers to nanotechnology for electronic components.

  • Opto electronics:
  • This branch deals with conversion of electrical energy into light energy. Example: LED(Light emitting devices), Solar cells(photovoltaic).

Applications of Electronics:

  • Communication Industry:
  • Communication has become very effective and fast. This is all possible due to transmission of information via radio waves

  • Entertainment Industry:
  • Phones and computer help us pass our boredom

  • Defense and Welfare Industry
  • Barometer is used to predict weather, Missile launching systems, Check pollution ,etc

  • Medicinal Appliances:
  • Electronic devices are used to test and diagnosis of various diseases. Stethoscope are used to listen to our inner heart beats.

  • Design of hardware:
  • Electronics is used to design hardware of various components like mobile phones, computers, etc.

Job opportunity for Electronic Engineers in 2021:

    1. Communication Officier
    2. Project manager
    3. Network engineering
    4. Rocket science
    5. Satellite engineering
    6. ICT officer
    7. Electronic design Engineering
    8. Aerospace engineering
    9. Biomedical engineering
    10. Computer hard ware engineering

Frequently Asked Question:

    1. What is an electronic device?
    Electronic devices are those devices which use electric current to encode, decode and transmit information. Eg: Computer, mobile phones, etc.

    2. Who is the father of electronics?
    Michael Faraday is the father of electronics.

    3. Is coding important for electronic engineering?
    Yes C, C++ and java are few programming language ECE students require to deal with embedded systems.

    4. What is the scope of electronic engineering after four years?
    It will have more scope as computers are becoming powerful day by day.

Difference between Pre Increment and Post Increment

Pre Increment and Post Increment are the features of unary operators. Unary operators are the important concepts of programming and is very easy to learn. Unary operators are mostly used to looping statements, function calls, etc. The unary operators have high precedence in C compared to other operators.(click here to check precedence table). Unary operators are operators with only one operand. Two types of unary operators in C program:
1. Increment operator (++): it increases the value by one.
2. Decrement operator (--): It decreases the value by one.

Difference Between Pre Increment and Post Increment.

Pre Increment Post Increment
It is used to increase the value of the variable by one before using in the expression It is used to increase the value of the variable by one only after using in the expression
It value gets incremented as soon as the expression is used The original value is used in an expression and then only it is incremented.
Its syntax is : ++ variable; Its syntax is : variable ++;
code snippet:
#include <stdio.h>
#include <stdlib.h>

void main()
{
   
   int res, n;

   n = 7;

   res = ++n;
   
   printf("%d", res);
}
Output: 8
code snippet:
#include <stdio.h>
#include <stdlib.h>

void main()
{
   
   int res, n;

   n = 7;

   res = n++;
   
   printf("%d", res);
}
Output: 7

C OPERATORS PRECEDENCE AND ASSOCIATIVITY

Rank

Operator

Explanation

Associativity

1

()

[]

.

->

Parenthesis

Square brackets

Direct Member selection

Indirect Member selection

 

Left to right

2

++

--

!

~

(type)

&

*

Increment

Decrement

Logical negation

Bitwise complement

Type casting

Address

Pointer reference

Right to left

3

*

/

%

Multiplication

Division

Remainder

Left to right

4

+

-

Addition

Subtraction

Left to right

5

<< 

>> 

Left shift

Right shift

Left to right

6

< 

<=

> 

>=

Less than

Less than or equal to

Greater than

Greater than or equal to

Left to right

7

==

!=

Equal to

Not equal to

Left to right

8

&

 

Bitwise AND

 

Left to right

9

^

 

Bitwise exclusive OR

 

Left to right

10

|

Bitwise Inclusive OR

Left to right

11

&&

Logical AND

Left to right

12

||

Logical OR

Left to right

13

?:

Ternary operator

Right to Left

14

=

*=

/=

%=

+=

-=

&=

^=

|=

<<=

>>=

Assignment

Multiplication assignment

Division assignment

Modulus assignment

Addition assignment

Subtraction assignment

Bitwise And assignment

Bitwise inclusive assignment

Bitwise exclusive assignment

Bitwise shift left assignment

Bitwise shift right assignment

Right to left

15

,

Comma

Left to right