Technocrat

  • Home

Friday, May 22, 2015

Print the Truth Table

 Sumit Kar     May 22, 2015     Basic, If Else, Switch Case, User Defined Function     No comments   

#include<stdio.h>

int OR(int,int);
int AND(int,int);
int XOR(int,int);
int NOT(int);

void main()
{
int a,b,ch,o;

printf("\n-:MENU:-\n1.AND\n2.OR\n3.NOT\n4.XOR\n0.Exit\n");
do{
printf("\nEnter Choice:");
scanf("%d",&ch);

switch(ch)
{
case 1:
printf ("\nTruth Table for AND\nA B \tO");
for(a=0;a<=1;a++)
{
for(b=0;b<=1;b++)
{
o=AND(a,b);
printf("\n%d %d \t%d",a,b,o);
}
}
break;
case 2:
printf ("\nTruth Table for OR\nA B \tO");
for(a=0;a<=1;a++)
{
for(b=0;b<=1;b++)
{
o=OR(a,b);
printf("\n%d %d \t%d",a,b,o);
}
}
break;
case 3:
printf ("\nTruth Table for NOT\nA \tO");
for(a=0;a<=1;a++)
{
o=NOT(a);
printf("\n%d \t%d",a,o);
}
break;
case 4:
printf ("\nTruth Table for XOR\nA B \tO");
for(a=0;a<=1;a++)
{
for(b=0;b<=1;b++)
{
o=XOR(a,b);
printf("\n%d %d \t%d",a,b,o);
}
}
break;

case 0: exit();
break;
default: printf("\nError");
}
}while(ch!=0);

}


int OR(int a, int b)
{
if(a==0&&b==0)
return 0;
else
return 1;
}

int AND(int a, int b)
{
if (a==1&&b==1)
return 1;
else
return 0;
}

int NOT(int a)
{
if (a==0)
return 1;
else
return 0;
}

int XOR(int a,int b)
{
if (a==0&&b==1||a==1&&b==0)
return 1;
else
return 0;
}

  

Output
-:MENU:-
1.AND
2.OR
3.NOT
4.XOR
0.Exit
Enter Choice: 3
Truth Table for NOT
A O
1 0
0 1
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
  •  WhatsApp

Thursday, May 21, 2015

Simple Interest

 Sumit Kar     May 21, 2015     Basic     No comments   

#include<stdio.h>
void main()
{
float p;
float ir,t;
float in;

printf("Principle amount : ");
scanf("%f",&p);
printf("\nInterest : ");
scanf("%f",&ir);
printf("\nTime (in year) : ");
scanf("%f",&t);
in=p*ir*t/100;
printf("\nYou will get interest : Rs. %.2f",in);

}

  



Output
Principle amount : 5000
Interest : 10
Time (in year) : 3
You will get interest :Rs. 1500.00
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
  •  WhatsApp

Print the Multiplication Table

 Sumit Kar     May 21, 2015     Basic, While Loop     No comments   

#include<stdio.h>

void main()
{
int x=1,num,res;
printf("Enter a Number : ");
scanf("%d",&num);
while(x<=10)
{
res=num*x;
printf("\n%d x %d = %d",num,x,res);
x++;
}
}

  


Output
Enter a Number : 6
6 x 1 = 6
6 x 2 = 12
6 x 3 = 18
6 x 4 = 24
6 x 5 = 30
6 x 6 = 36
6 x 7 = 42
6 x 8 = 48
6 x 9 = 54
6 x 10 = 60
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
  •  WhatsApp

Find the Greatest of Three Numbers

 Sumit Kar     May 21, 2015     Basic, If Else     No comments   

#include<stdio.h>
void main()
{
int x,y,z;
printf("Enter values of x, y and z : ");
scanf("%d,%d,%d",&x,&y,&z);
if(x>=y && x>=z)
printf("\n%d is greatest",x);
else if(y>=z)
printf("\n%d is greatest",y);
else
printf("\n%d is greatest",z);
}

  

Output
Enter values of x, y and z : 4, 9, 2
9 is greatest
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
  •  WhatsApp

Find Greatest number using Conditional Operator

 Sumit Kar     May 21, 2015     Basic, Conditional Operator, Tricky     No comments   

#include<stdio.h>

void main()
{
int n1,n2,n3;
printf("Enter Numbers (n1 n2 n3) : ");
scanf("%d %d %d",&n1,&n2,&n3);
printf("Greatest= %d",n1>n2?n1>n3?n1:n3:n2>n3?n2:n3);
}

  

Output
Enter Numbers (n1 n2 n3) : 4 9 2
Greatest= 9
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
  •  WhatsApp

Print 1 to 10 using For Loop

 Sumit Kar     May 21, 2015     Basic, For Loop     No comments   

#include<stdio.h>
int main()
{
int x=1;

for(x=1; x<=10; x++)
printf("\n%d",x);

return 0;
}

  

Output
1
2
3
4
5
6
7
8
9
10
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
  •  WhatsApp

Print 1 to 10 using While Loop

 Sumit Kar     May 21, 2015     Basic, While Loop     No comments   

#include<stdio.h>
#include<conio.h>
int main()
{
int x=1;
while(x<=10)
{
printf("\n%d",x);
x++;
}
getch();
return 0;
}

  

Output
1
2
3
4
5
6
7
8
9
10
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
  •  WhatsApp

Swap two Numbers

 Sumit Kar     May 21, 2015     Basic     No comments   

#include<stdio.h>

void main()
{
int x,y,z;
printf("Enter Values x and y : ");
scanf("%d%d",&x,&y);
z=y;
y=x;
x=z;
printf("\nValue of x=%d",x);
printf("\nValue of y=%d",y);
}
  


Output
Enter Values x and y : 5 4
Value of x= 4
Value of y= 5
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
  •  WhatsApp

Sum of two numbers

 Sumit Kar     May 21, 2015     Basic     No comments   

#include<stdio.h>

void main()
{
int a,b,sum;
printf("Enter Numbers a and b : ");
scanf("%d %d",&a,&b);
sum=a+b;
printf("\n%d + %d = %d",a,b,sum);
}
   


Output
Enter Numbers a and b :5 4
5 + 4 = 9
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
  •  WhatsApp

Print "Hello, World!" without semicolon

 Sumit Kar     May 21, 2015     Basic, Tricky     No comments   

Solution: 1
#include<stdio.h>
void main(){
if(printf("Hello world")){
}
}
Solution: 2
#include<stdio.h>
void main(){
while(!printf("Hello world")){
}
}

Solution: 3
#include<stdio.h>
void main(){
switch(printf("Hello world")){
}
}

  


Output
Hello, World!
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
  •  WhatsApp

Print "Hello, World!"

 Sumit Kar     May 21, 2015     Basic     No comments   

#include<stdio.h>

int main()
{
printf("\nHello, World! ");
return 0;
}

  

Output
Hello, World!
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
  •  WhatsApp

Accept Name, Age from User and Print them on the Screen

 Sumit Kar     May 21, 2015     Basic     No comments   

#include<stdio.h>
int main()
{
char nam[20];
int age;
printf("Enter Your Name : ");
scanf("%s",&nam);
printf("Enter Your Age : ");
scanf("%d",&age);
printf("\nYour Name is %s ",nam);
printf("and your age is %d",age);
return 0;
}

  

Output
Enter Your Name : Sumit
Enter Your Age : 21

Your Name is Sumit and your age is 21

Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
  •  WhatsApp

Thursday, May 14, 2015

Normalization

 Sumit Kar     May 14, 2015     DBMS, featured, Programming     No comments   



Normalization













Normalization is the process of splitting relations into well-structured relations that allow users to insert, delete, and update tuples without introducing database inconsistencies. The focus of normalization is to reduce redundant data to the minimum.  Normalization is also called “Bottom-up approach”, because this technique requires very minute details like every participating attribute and how it is dependant on the key attributes, is crucial. If you add new attributes after normalization, it may change the normal form itself.


Through Normalization, the collection of data in a single table is distributed into multiple tables with specific relation. Without normalization many problems can occur when trying to load an integrated conceptual model into the DBMS. These problems arise from relations that are generated directly from user views are called anomalies. There are three types of anomalies:












RollNo


StudentName


CourseNo


CourseName


Instructor


120


SKL


CS-75


DBMS


SB


89


KBC


CS-75


DBMS


SB


25


ABC


CS-75


DBMS


SB


48


XYZ


CS-30


CA


MC


57


TKC


CS-80


OS


JB


120


SKL


CS-80


OS


JB


68





CS-90


FLAT


LD







Update anomaly: An update anomaly is a data inconsistency that results from data redundancy and a partial update. For example, if there is a change in the name of the instructor for CS-75, we need to make change for all the rows. If we forget to update a single row the database will show two instructor names for the Course CS-75.





Deletion anomaly:  This means loss of useful information. In some cases it may occur that some useful data is lost. For example, consider the row for RollNo 48. XYZ is the only student who has opted for CS-30. If XYZ leaves the institute and the data is deleted for XYZ, the associated data for Course will also be deleted.





Insertion anomaly: An insertion anomaly is the inability to add data to the database due to absence of other data. For example, assume that the above table is defined so that null values are not allowed. If a course is added but not immediately students opt for the course, then this course could not be entered into the database (68). This results in database inconsistencies due to omission.





In database tables are normalized for the following reasons:


To allow data retrieval at an optimal speed


Data maintenance through update, insertion and deletion.


To reduce the need to restructure tables for new applications





A functional dependency is a constraint between two sets of attributes in a relation from a database. It occurs when an attribute in a relation uniquely determines another attribute.


In a given relation R, X and Y are attributes. Attribute Y is functionally dependent on attribute X if each value of X determines EXACTLY ONE value of Y, which is represented as X → Y (X can be composite in nature).


We say here “X determines Y” or “y is functionally dependent on x”.


 X→Y does not imply Y→X.


If the value of an attribute “Marks” is known then the value of an attribute “Grade” is determined since Marks→ Grade







RollNo


StudentName


Marks


Grade


59


ABC


90


A


96


XYZ


70


B







Types of functional dependencies:


1.       Full Functional dependency: X and Y are attributes. X Functionally determines Y (Note: Subset of X should not functionally determine Y)


2.       Partial Functional dependency:  X and Y are attributes. Attribute Y is partially dependent on the attribute X only if it is dependent on a sub-set of attribute X.


3.       Transitive dependency: X Y and Z are three attributes. X -> Y, Y-> Z => X -> Z








Now consider the following Relation


REPORT (STUDENT#, COURSE#, CourseName, IName, Room#, Marks, Grade)


• STUDENT# - Student Number


• COURSE# - Course Number


• CourseName - Course Name


• IName - Name of the Instructor who delivered the course


• Room# - Room number which is assigned to respective Instructor


• Marks - Scored in Course COURSE# by Student STUDENT#


• Grade - obtained by Student STUDENT# in Course COURSE#





The Functional Dependencies are:


• STUDENT# COURSE# → Marks


• COURSE# → CourseName,


• COURSE# → IName (Assuming one course is taught by one and only one


Instructor)


• IName → Room# (Assuming each Instructor has his/her own and non-shared room)


• Marks → Grade


           In above example Marks is fully functionally dependent on STUDENT# COURSE# and not on subset of STUDENT# COURSE#. This means Marks cannot be determined either by STUDENT# OR COURSE# alone. It can be determined only using STUDENT# AND COURSE# together. Hence Marks is fully functionally dependent on STUDENT# COURSE#. CourseName is not fully functionally dependent on STUDENT# COURSE# because subset of STUDENT# COURSE# i.e only COURSE# determines the CourseName and STUDENT# does not have any role in deciding CourseName. Hence CourseName is not fully functionally dependent on STUDENT# COURSE#.


Now CourseName, IName, Room# are partially dependent on composite attributes STUDENT# COURSE# because COURSE# alone defines the CourseName, IName, Room#.


Again, Room# depends on IName and in turn IName depends on COURSE#. Hence Room# transitively depends on COURSE#. Similarly Grade depends on Marks, in turn Marks depends on STUDENT# COURSE# hence Grade depends Fully transitively on STUDENT# COURSE#.





Now consider this table:







Student Data


Course Details


Result


STUDENT#


StudentName


COURSE#


CourseName


IName


Room#


Marks


Grade































First normal form (1NF)


A relation schema is in 1NF if:


·         If and only if all the attributes of the relation R are atomic in nature.


·         Atomic: the smallest level to which data may be broken down and remain meaningful.


In relational database design it is not practically possible to have a table which is not in 1NF.






STUDENT#


StudentName


COURSE#


CourseName


IName


Room#


Marks


Grade































Second normal form (2NF)


A Relation is said to be in Second Normal Form if and only if:


·         It is in the First normal form, and


·         No partial dependency exists between non-key attributes and key attributes.


An attribute of a relation R that belongs to any key of R is said to be a prime attribute and that which doesn’t is a non-prime attribute To make a table 2NF compliant, we have to remove all the partial dependencies


Note: - All partial dependencies are eliminated






STUDENT#


StudentName

















COURSE#


CourseName


IName


Room#























STUDENT#


COURSE#


Marks


Grade



















Third normal form (3 NF)


A relation R is said to be in the Third Normal Form (3NF) if and only if:


·         It is in 2NF and


·         No transitive dependency exists between non-key attributes andkey attributes.


• STUDENT# and COURSE# are the key attributes.


• All other attributes, except grade are nonpartially, non-transitively dependent on key attributes.









STUDENT#


StudentName

















COURSE#


CourseName


IName


Room#























STUDENT#


COURSE#


Marks




















Marks (Lower Bound)


Marks (Upper Bound)


Grade













Boyce-Codd Normal form (BCNF)


A relation is said to be in Boyce Codd Normal Form (BCNF)


·         If and only if all the determinants are candidate keys.


BCNF relation is a strong 3NF, but not every 3NF relation is BCNF.


Consider the table:






Student#


EmailID


Course#


Marks


ABC


abc@sumitkar.in


CS-75


98







Candidate Keys for the relation are [C#, S#] and [C#, Email]. Since Course # is overlapping, it is referred as Overlapping Candidate Key. Valid Functional Dependencies are:


S#  → EmailID


EmailID → S#


S#, C# → Marks


C#, EmailID →Marks






Student#


EmailID


ABC


abc@sumitkar.in











Student#


Course#


Marks


ABC


CS-75


98


















Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
  •  WhatsApp

Tuesday, May 12, 2015

Earthquake - Do's and Don'ts

 Sumit Kar     May 12, 2015     Earthquake, featured_slider     1 comment   

Earthquake - Do's and Don'ts, Kolkata, Gov


A. Before an earthquake:

• Follow and advocate local safe building codes for earthquake resistant construction.
• Follow and advocate upgrading poorly built structures.
• Make plan and preparation for emergency relief.
• Identify the medical centres, fire fighting stations, police posts and organise relief society of your area.
• Know the electric and water shut off locations in your house.
• Heavy objects, glasses, cutlery should be kept in lower shelves.
• Flower pots should not be kept on the parapet.

B. During an earthquake:

• Keep calm and reassure others.
• During the event, the safest place is an open space, away from buildings.
• If you are indoors, take cover under a desk, table, bed or doorways and against inside walls and staircase. Stay away from
glass doors, glass panes, windows or outside doors. Do not rush to go out of the building, to avoid stampede.
• If you are outside, move away from buildings and utility wires.
• Once in the open, stay there till the vibrations stops.
• If you are in a moving vehicle, stop as quickly as possible and stay in the vehicle.
• Free all pets and domestic animals so that they can run outside.
• Do not use candles, matches or other open flames. Put out all fires.

C. After an earthquake:

• Keep stock of drinking water, foodstuff and first-aid equipment in accessible place.
• Do not spread and believe rumours.
• Turn on your transistor or television to get the latest information/bulletins and aftershock warnings.
• Provide help to others and develop confidence.
• Attend the injured persons and give them aid, whatever is possible and also inform hospital.
• Be prepared for aftershocks as these may strike.
• Close the valve of kitchen gas stove, if it is on. If it is closed, do not open. Do not use open flames.
• Do not operate electric switches or appliances, if gas leaks are suspected.
• Check water pipes, electric lines and fittings. If damaged, shut off the main valves. Do not touch live wires of electricity.
• If needed, open doors and cup boards carefully as objects may fall.


Via: imd.gov.in
Print Friendly Version of this pagePrint Get a PDF version of this webpagePDF
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
  •  WhatsApp

Thursday, May 7, 2015

Now Send mp3 via WhatsApp for Windows Phone

 Sumit Kar     May 07, 2015     Microsoft, Technology, WhatsApp, Windows     No comments   





WhatsApp, beta, windows 10, update, 2.12.20, 2.11.688, http://www.sumitkar.in/2015/05/whatsapp-getting-ready-for-windows-10.html
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
  •  WhatsApp

WhatsApp getting ready for Windows 10

 Sumit Kar     May 07, 2015     Microsoft, Technology, WhatsApp, Windows     1 comment   



WhatsApp, beta, windows 10, update, 2.12.20, 2.11.688, http://www.sumitkar.in/2015/05/whatsapp-getting-ready-for-windows-10.html




WhatsApp today released an update for the Beta version. Primarily the update looks like a Bug Fix update. But while Tech enthusiasts dig into the deep, the update suggests that WhatsApp is getting ready for Windows 10.




Notification panel for WhatsApp v 2.11.688 on Windows 10
Notification panel for WhatsApp v 2.11.688 on Windows 10




Notification panel for WhatsApp v 2.12.20 on Windows 10
Notification panel for WhatsApp v 2.12.20 on Windows 10




There are four visible changes. Firstly one of the major feature WhatsApp for Windows Phone was missing for a long time. Now we can attach Audio mp3 files and send it via WhatsApp.


mp3, Screenshot, Windows 10, Beta, WhatsApp, calling feature

Secondly, while sending text there is a cool animation for the chat bubbles. There is another cool new feature to select multiple chats and delete or archive the. And lastly there is a toggle button to enable or disable read receipt in the Privacy Settings.



Read Receipt, Screenshot, Windows 10, Beta, WhatsApp, calling feature






There is a significant change in the version number. While writing this the Public version is 2.11.688, while the Beta version is 2.12.20. I though this version must have the most awaited calling feature. But there is no trace of calling feature in this version.


User Voice - WhatsApp


The feature with maximum requests is finally here. Hope to see many new cool features soon. Specially the Voice Calling feature.








Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
  •  WhatsApp
Newer Posts Older Posts Home

Pages

  • Home

Trending Now

  • Write a Program to Add two 3x3 Matrix using C
    #include<stdio.h> void main () { int a [ 3 ][ 3 ], b [ 3 ][ 3 ], s [ 3 ][ 3 ], i , j ; printf ( "Enter the values of ...
  • C program for Unit Conversion
    /* Convert Celsius to Fahrenheit */ #include<stdio.h> void main() {     float c,f;     printf("Enter the temperature in Celcius: ...
  • Addition of two numbers on Server sent from Client [TCP] using C
    /* tcpClient.c */ #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #inc...
  • Write a Program to Print the Truth Table of Basic Gates using C
  • Write a Program to Add two 5x5 Matrix using C
    #include<stdio.h> void main() {   int a[5][5],b[5][5],c[5][5];   int i,j;   for(i=0;i<5;i++)   {     printf("\nEnter elements ...
  • Using the concept of Inheritance write a C++ Program to calculate the area and perimeter of rectangle
    /* C++ Program to calculate the area and perimeter of rectangles using concept of inheritance. */ #include using namespace std; class Re...
  • Concatenation of two strings sent from Client on the Server - [ TCP ] using C
    /* tcpClient.c */ #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #inc...
  • 8085 Programming: Exchange the contents of memory locations
    Exchange the contents of memory locations 2000H and 4000H. Program 1: LDA 2000H : Get the contents of memory location 2000H into accumulator...
  • Calculate Depreciation using C
    #include<conio.h> #include<stdio.h> void main () { float sv , pv , dep ; int yos ; clrscr (); printf ( "Enter the pu...
  • 8085 Programming: 1's COMPLEMENT OF A 16-BIT NUMBER
    The 16bit number is stored in C050,C051 The answer is stored in C052,C053   LXI H,C050   MOV A,M   CMA   STA C052   INX H   MOV ...

Blog Archive

  • ►  2020 (1)
    • ►  May (1)
  • ▼  2015 (92)
    • ►  October (4)
    • ►  September (3)
    • ►  August (3)
    • ►  July (9)
    • ►  June (9)
    • ▼  May (20)
      • Print the Truth Table
      • Simple Interest
      • Print the Multiplication Table
      • Find the Greatest of Three Numbers
      • Find Greatest number using Conditional Operator
      • Print 1 to 10 using For Loop
      • Print 1 to 10 using While Loop
      • Swap two Numbers
      • Sum of two numbers
      • Print "Hello, World!" without semicolon
      • Print "Hello, World!"
      • Accept Name, Age from User and Print them on the S...
      • Normalization
      • Earthquake - Do's and Don'ts
      • Now Send mp3 via WhatsApp for Windows Phone
      • WhatsApp getting ready for Windows 10
      • Addition of two numbers on Server sent from Client...
      • Concatenation of two strings sent from Client on t...
      • UDP Client-Server Program (Command Line) using C
      • UDP Client-Server Program using C
    • ►  April (7)
    • ►  March (22)
    • ►  February (7)
    • ►  January (8)
  • ►  2014 (158)
    • ►  November (70)
    • ►  October (6)
    • ►  September (82)
Powered by Blogger.

Categories

C - Programming Java Programming Basic Technology 8085 Assembly Programming For Loop Numerical Methods WhatsApp Algorithm Shell Programming Programming Networking Windows Android C++ Programming CPP If Else Tricky Internet Microsoft Pattern Photography Socket Program News While Loop Array DBMS DS Macro Recursion User Defined Function Conditional Operator Data Structure Durga Puja Earthquake Google Mela Nokia SQL Share Yahoo Airtel Bio Command Prompt Confused Facebook Finance Firefox Ganges Graph HokKolorob Input Kolkata MCQ Math Matrix NetNeutrality Oracle Religion Search Sumit Kar Survey Switch Case Viral Virus Visual Studio do-while featured featured_slider

Popular Programs

  • Write a Program to Add two 3x3 Matrix using C
    #include<stdio.h> void main () { int a [ 3 ][ 3 ], b [ 3 ][ 3 ], s [ 3 ][ 3 ], i , j ; printf ( "Enter the values of ...
  • C program for Unit Conversion
    /* Convert Celsius to Fahrenheit */ #include<stdio.h> void main() {     float c,f;     printf("Enter the temperature in Celcius: ...
  • Addition of two numbers on Server sent from Client [TCP] using C
    /* tcpClient.c */ #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #inc...
  • Write a Program to Print the Truth Table of Basic Gates using C
  • Write a Program to Add two 5x5 Matrix using C
    #include<stdio.h> void main() {   int a[5][5],b[5][5],c[5][5];   int i,j;   for(i=0;i<5;i++)   {     printf("\nEnter elements ...
  • Using the concept of Inheritance write a C++ Program to calculate the area and perimeter of rectangle
    /* C++ Program to calculate the area and perimeter of rectangles using concept of inheritance. */ #include using namespace std; class Re...
  • Concatenation of two strings sent from Client on the Server - [ TCP ] using C
    /* tcpClient.c */ #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #inc...
  • 8085 Programming: Exchange the contents of memory locations
    Exchange the contents of memory locations 2000H and 4000H. Program 1: LDA 2000H : Get the contents of memory location 2000H into accumulator...
  • Calculate Depreciation using C
    #include<conio.h> #include<stdio.h> void main () { float sv , pv , dep ; int yos ; clrscr (); printf ( "Enter the pu...
  • 8085 Programming: 1's COMPLEMENT OF A 16-BIT NUMBER
    The 16bit number is stored in C050,C051 The answer is stored in C052,C053   LXI H,C050   MOV A,M   CMA   STA C052   INX H   MOV ...

Daily Hits

Copyright © Sumit Kar