How To Make Symbols With Keyboard In MS Excel

Posted by Tushar Bedekar

Alt + 0153..... ™... trademark symbol
Alt + 0169.... ©.... copyright symbol
Alt + 0174..... ®....registered ­ trademark symbol
Alt + 0176 ...°......degre ­e symbol
Alt + 0177 ...±....plus-or ­-minus sign
Alt + 2 ......☻.....bla­ck smiley face
Alt + 15.....☼.....su­n
Alt + 12......♀.....female sign
Alt + 11.....♂......m­ale sign
Alt + 6.......♠.....spade
Alt + 5.......♣...... ­Club
Alt + 3.............. ­Heart
Alt + 4.......♦...... ­Diamond
Alt + 13......♪.....e­ighth note
Alt + 14......♫...... ­beamed eighth note
Alt + 8721.... ∑.... N-ary summation (auto sum)
Alt + 251.....√.....s­quare root check mark
Alt + 8236.....∞..... ­infinity
Alt + 24.......↑..... ­up arrow
Alt + 25......↓...... ­down arrow
Alt + 26.....→.....ri­ght arrow
Alt + 27......←.....l­eft arrow
Alt + 18.....↕......u­p/down arrow
Alt + 29......↔...left right arrow

Read More

SORTING A STRING IN AN ALPHABETICAL ORDER:-

Posted by Tushar Bedekar


#include <stdio.h>
#include <stdlib.h>
#include <string.h>

void sort_string(char*);

int main()
{
   char string[100];

   printf("Enter some text\n");
   gets(string);

   sort_string(string);
   printf("%s\n", string);

   return 0;
}

void sort_string(char *s)
{
   int c, d = 0, length;
   char *pointer, *result, ch;

   length = strlen(s);

   result = (char*)malloc(length+1);       //use of pointer here 

   pointer = s;

   for ( ch = 'a' ; ch <= 'z' ; ch++ )
   {
      for ( c = 0 ; c < length ; c++ )
      {
         if ( *pointer == ch )
         {
            *(result+d) = *pointer;
            d++;
         }
         pointer++;
      }
      pointer = s;
   }
   *(result+d) = '\0';

   strcpy(s, result);
   free(result);

}


Read More

C ANAGRAM PROGRAMMING CODE

Posted by Tushar Bedekar


#include <stdio.h>

int check_anagram(char [], char []);

int main()
{
   char a[100], b[100];
   int flag;

   printf("Enter first string\n");
   gets(a);

   printf("Enter second string\n");
   gets(b);

   flag = check_anagram(a, b);

   if (flag == 1)
      printf("\"%s\" and \"%s\" are anagrams.\n", a, b);
   else
      printf("\"%s\" and \"%s\" are not anagrams.\n", a, b);

   return 0;
}

int check_anagram(char a[], char b[])
{
   int first[26] = {0}, second[26] = {0}, c = 0;

   while (a[c] != '\0')
   {
      first[a[c]-'a']++;
      c++;
   }

   c = 0;

   while (b[c] != '\0')
   {
      second[b[c]-'a']++;
      c++;
   }

   for (c = 0; c < 26; c++)
   {
      if (first[c] != second[c])
         return 0;
   }

   return 1;
}

OUTPUT OF THE PROGRAM ME:-

Download Anagram Programme

Read More

c program me to get IP address of your computer

Posted by Tushar Bedekar 4 Comments


 
 #include<stdlib.h>

int main()
{
system("C:\\Windows\\System32\\ipconfig");


return 0;
}
 

 

 Download ip address programme

Read More

Write a C program to Sort the list of integers using Bubble Sort

Posted by Tushar Bedekar


#include(stdio.h)                                 //note place '<' & '>' in place of '(' & ')'
#include(conio.h)
void bubble(int [ ], int);                                           // func. declaration
void main( )
{
 int a[10],n,i;
clrscr();
printf("Enter the no. of elements u want to fill:");
scanf("%d",&n);
printf("\nEnter the array elements:");
for(i=0; i< n; i++)
scanf("%d",&a[i]);

bubble(a,n);                                                             // calling function
getch();
}

void bubble(int b[], int no)                                            // called function
{
int i,j,temp;
for(i=0; i< no-1; i++)
{
for(j=0; j< no-i; j++)
{
if(b[j]>b[j+1])
{
temp=b[j];
b[j]=b[j+1];
b[j+1]=temp;
}
}
}
printf("\nAfter sorting : ");
for(i=0; i< no; i++)
printf("%5d",b[i] );
}

Output:- Enter the no. of elements u want to fill: 5
Enter the array elements : 8  1  90  5  4
After sorting : 1  4  5  8  90
Read More

Write a C program to print the Given pyramid

Posted by Tushar Bedekar




      1


    1 2  
   1 2 3 
  1 2 3 4 
 1 2 3 4 5
  .
  .
  .
  n

Solution:-#include(stdio.h)                        // note place '<' & '>' in place of '(' & ')'
#include(conio.h)
int main( )
{
int r,c,n,sp;
clrscr( );
printf("Enter the no. of rows u want to print:");
scanf("%d", &n);
for(r=1; r<=n; r++)

for(sp=n; sp>=r; sp--)
printf(" ");                                                 // give one space in betw quotations.
for(c=1; c<=r; c++)
printf("%2d", c);
printf("\n");
}
getch( );
return 0;
}
Read More

Write a C program to find GCD of each of the two consecutive elements of an array. write a function GCD(a,b) that would take two consecutive elements of the array as arguments and return the GCD

Posted by Tushar Bedekar

#include(stdio.h)                                  // Note place '<' & '>' in place of '(' & ')'
int gcd(int,int);
void main()
{
  int a[10],n,i,b[10];
  int x,y;
  clrscr();
  printf("Enter the size of the array:");
  scanf("%d",&n);
  printf("\nEnter the array elements:");
  for(i=0; i< n ;i++)
    scanf("%d",&a[i]);
 for(i=0; i< n-1 ;i++)
  {
     x=a[i];
     y=a[i+1];
     b[i]=gcd(x,y);
    printf("\nG.C.D of %d and %d is : %d",x,y,b[i]);
  }
getch();
}
int gcd(int a,int b)
{
  int rem;
  for(;;)
  {
    rem=a%b;
    if(rem==0)
       break;
    a=b;
    b=rem;
  }
 return b;
}
Read More

Write a C program to get the maximum and minimum values of a Data type

Posted by Tushar Bedekar

#include(stdio.h)                                     // note place '<' & '>' in place of '(' & ')'
#include(conio.h) 
void main( )
{
int x, y;
clrscr( );
x=1;  
while( x > 0)
{
y = x;
x + + ;
}
printf("\nMaximum value : %d ", y );
printf("\nMinimum value : %d", x);
getch( );
}

Output:- Maximum value : 32767
Minimum value : -32768

Similarly we can find the below datatypes,
long int ( %ld ) 
char ( %d ) 
unsigned ( %u )
.....
Read More

Write a C function that defines two strings as parameters, as follows, and checks whether the second string (str2) is a substring of the first one (str1).

Posted by Tushar Bedekar



int substring_finder(char* str1, char* str2);
The function should return an integer as follows:
• 2 if str2 is a substring of str1 and also of same length
o e.g. str1 = "Hello" and str2= "Hello"
• 1 if str2 is a substring of str1 and of different lengths
o e.g. str1 = "Hello World" and str2= "Hello"
• 0 if str2 is not a substring of str1
o e.g. str1 = "Hello" and str2= "Helo"


 

program me starts from here:-

#include(string.h)                                         //  note place '<' & '>' in place of '(' & ')'
#include(stdio.h)
int substring_finder(char *,char *);
int main()
{
  char *str1,*str2;
  int fl;
  clrscr();
  printf("Enter the main string:");
  gets(str1);
  printf("Enter the sub-string:");
  gets(str2);
  fl=substring_finder(str1,str2);

  if(fl==0)
    printf("\n'str2' is not a substring of 'str1'");
  else if(fl==1)
    printf("\n'str2' is a substring of 'str1'");
  else if(fl==2)
    printf("\nBoth are equal");

getch();
return 0;
}
int substring_finder(char *str,char *sub)
{
  int flag;
  if(strcmp(str,sub)==0)
     flag=2;
  else if(strstr(str,sub))
     flag=1;
  else
     flag=0;

  return flag;
}
Read More
back to top