Skip to main content

Posts

Showing posts from August, 2019

Data Structures/type of data structures/premtive data structures/non-premtive data structures/-linear /non-linear/what is array?/what is charectar?/what is string?/what is linklist ?/diffination/question

Data Structures a particular organization of data by logical or mathematical model is called data  Structures two type of data structures. 1-Primitive data structures 2-non-Primitive  data structures *Primitive data structures* example-integer,character,float,double,etc. *non-Primitive data structure* two type of non-primitive data structures 1-linear  2-non-linear *linear* example-array,linked list,stack,queues,etc. *non-linear* example-tree,graph,etc. ====================================== what is array? array is a finite homogeneous which first element is 0 and last element is NULL( '\0' ). example- if an array of 9 elements,then it is written as 0 to 8.                                0 1 2 3 4 5 6 7 8  what is character? Any alphabet symbol or digit which include single quotes('   ')  are known as cha...

C Program to find union of two sets

C Program to find union of two sets #include<stdio.h> #include<conio.h> void main() {  int A[10],B[10],C[10],i,j,k=0,n,m,flag=0;  clrscr();  printf("Enter the size of array A");  scanf("%d",&n);  printf("Enter the element of First array A");    for(i=0;i<n;i++)      {        scanf("%d",&A[i]);      }      printf("Enter the size of array B");  scanf("%d",&m);  printf("Enter the elements of array B");    for(j=0;j<m;j++)      {        scanf("%d",&B[j]);      } for(i=0;i<n;i++)  {   C[k]=A[i];   k++; } for(i=0;i<n;i++)  {  flag=0;   for(j=0;j<m;j++)    {     if(B[i]==C[j])      {      flag==1;      break;  ...

logic gate

logic gate In the previous tutorials, we saw that by using the three principal gates, the AND Gate, the OR Gate and the NOT Gate, we can build many other types of logic gate functions, such as a NAND Gate and a NOR Gate or any other type of digital logic function we can imagine. But there are two other types of digital logic gates which although they are not a basic gate in their own right as they are constructed by combining together other logic gates, their output Boolean function is important enough to be considered as complete logic gates. These two “hybrid” logic gates are called the  Exclusive-OR (Ex-OR) Gate  and its complement the  Exclusive-NOR (Ex-NOR) Gate . Previously, we saw that for a 2-input  OR  gate, if A = “1”,  OR  B = “1”,  OR BOTH  A + B = “1” then the output from the digital gate must also be at a logic level “1” and because of this, this type of logic gate is known as an  Inclusive-OR  f...