Category: Miscellaneous

  • Program to find GCD of two numbers in C language

    Program to find GCD of two numbers in C language

    The following program is to find the GCD or HCF of a number using C Language. GCD is the Greatest Common Divisor that divides a particular number. #include<stdio.h> void main(){ int a,b,i,j; printf(“\n****************************\nprogram to find GCD of 2 Numbers\n*****************************\n\n”); printf(“Enter two numbers: “); scanf(“%d%d”,&a,&b); printf(“Common Factors for %d and %d are: “,a,b); j=a>b?b:a; for(i=1;i<=j;i++){ if(a%i==0…

  • Program to convert a Character into ASCII value using C Language

    Program to convert a Character into ASCII value using C Language

    In C language, The integer value for a character is always it’s ASCII value. So If you want to print an ASCII value of a character in C then simply use %d to get the character’s ASCII integer value. Code: #include<stdio.h> void main(){ int c; char d; printf(“\n\n*****************Program to output ASCII code for an input********************\n”);…

  • Patterns Program Using C Language

    Patterns Program Using C Language

    The below article consists of different patterns that can be generated using C programs. Code-1: #include<stdio.h> void main(){ int i,j,k; int c=1,v=0; for(i=1;i<=9;i++){ if(i%2!=0){ for(j=i;j<=9;j++) { printf(” “); } for(k=1;k<=i;k++){ c++; if(c%2!=0){printf(“1 “); } else if(v==0) { printf(“1 “); v++;} else{ printf(“0 “);      } }    printf(“\n”);c=0;} } } OUTPUT:     CODE…

  • Program to Read an Input Keystroke using C Language

    **Note: To perform this I have used Dev c++ tool. It is checked and compiled. We can simple use getchar() to read the input character in C language Code: #include<stdio.h> void main(){ char c; printf(“\n\n*****************Program to Read an Input Keystroke******************\n\n”); printf(“Enter a Character: \n”); c=getchar(); printf(“Your Input Is: %c “,c); } OUTPUT:

  • Internet Surfing: How much you expose yourself?

    Internet Surfing: How much you expose yourself?

    We all surf internet without caring about our privacy. Why do you think the cyber crime exists? Why do you think hacktivists turn against the government? The answer to this is PRIVACY. Most of the people today who are not technology oriented doesn’t care about what information they share on Internet. All that matters to…

  • How to become a Hacker?

    How to become a Hacker?

    Hacker is a person who can gain unauthorized access to  a device. Many people have this question in their mind, “How to become one?”. Before I give answer to this question, I would like to explain the concept of everything related to hacking. Hacking is a vast field, it consist of topics not just limited…

  • SQL Injection part 3: Identifying String Data or Numeric Data

    SQL Injection part 3: Identifying String Data or Numeric Data

    This is my third post on SQL Injection, The first post SQL Injection part 1 was just a basic one to check if the SQL vulnerability exist on a certain website and SQL Injection part 2 shows how to exploit the SQL vulnerability. We inject SQL in three parameters, namely: String Data Numeric Data Query structure In…

  • Program To Convert Binary to Decimal Using C Language

    **NOTE: The following code for “Program To Convert Binary to Decimal Using C Language” has been written and performed on Ubuntu OS, To run the following code in Windows on Turbo C, You need to add #include as one of the header files and getch() at the end of the code before main() closing brace…

  • Program to Convert Floating Decimal to Binary Using C Language

    **NOTE: The following code for “Program to Convert Floating Decimal To Binary Using C language” has been written and performed on Ubuntu OS, To run the following code in Windows on Turbo C, You need to add #include<conio.h> as one of the header files and getch() at the end of the code before main() closing…

  • Converting Decimal To Binary Using C language

    **NOTE: The following code for “Converting Decimal To Binary Using C language” has been written and performed on Ubuntu OS, To run the following code in Windows on Turbo C, You need to add #include<conio.h> as one of the header files and getch() at the end of the code before main() closing brace “}”. #include<stdio.h>…

  • The Bits and The Bytes

    In this article we are going to talk about the Computer Basics : The Bits and The Bytes.Computers are used to process data. Computers works on instructions to process data. They do it electrically inside CPU(central processing unit). Computer don’t really understand the language that a human mind can understand.There processing capabilities lies within bits and…

  • SQL Injection Part 2

    In this article we will be looking at SQL Injection and how we can exploit different types of SQL vulnerabilities present on a website.SQL Injection is one most dangerous ways to get into some site and ruin it totally! Database contains every precious information. It consist of records of credit cards, names with address or…