C graphics programming

basic graphics program in c

C graphics programming     #include <graphics.h>   #include <conio.h>    int main()   {       int gd = DETECT, gm;      initgraph(&gd, &gm,”C:\\TC\\BGI”);      outtextxy(10, 20, “Graphics programming is fun!”);      circle(200, 200, 50);       setcolor(BLUE);       line(350, 250, 450, 50);       getch();       closegraph( );       return 0;   }

comment in c program

comment in c program

comment in c program   Example – comments in a program #include <stdio.h>   int main()   {      // Single line comment in a C program      printf(“Writing comments is very useful.\n”);      /*       * Multi-line comment syntax       * Comments help us to understand program later … Read more

How to disable IPv6 in Ubuntu

ubuntu

 How to disable IPv6 in Ubuntu To disable ipv6, you have to open /etc/sysctl.conf using any text editor and insert the following lines at the end: net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1 If ipv6 is still not disabled, then the problem is that sysctl.conf is still not activated. To solve this, open a terminal(Ctrl+Alt+T) and type … Read more

C Program to Check Whether a Character is Vowel or Consonant

c program for vowel and consonent

C Program to Check Whether a Character is Vowel or Consonant The five alphabets A, E, I, O and U are called vowels. All other alphabets except these 5 vowel letters are called consonants.   #include <stdio.h> int main() { char c; int isLowercaseVowel, isUppercaseVowel; printf(“Enter an alphabet: “); scanf(“%c”,&c); // evaluates to 1 (true) … Read more

MySQL Server Logs

mysql 5.7

 MySQL Server Logs MySQL Server has several logs that can help you find out what activity is taking place. By default, no logs are enabled, except the error log on Windows. (The DDL log is always created when required, and has no user-configurable options. The following logspecific sections provide information about the server options that … Read more

C Program to Find Factorial of a Number

factorial program example in c

C Program to Find Factorial of a Number The factorial of a positive number n is given by: factorial of n (n!) = 1*2*3*4….n The factorial of a negative number doesn’t exist. And, the factorial of 0 is 1, 0! = 1 #include <stdio.h> int main() { int n, i; unsigned long long factorial = 1; … Read more

C Program to check whether a Number is a Palindrome

palindrome program in c

C Program to check whether a Number is a Palindrome A palindrome is a number or a string which is similar when read from the front and from the rear. For example: 121 or Oppo etc. Below is a program to check whether a number is a palindrome or not. #include<stdio.h> #include<conio.h> void main() { int a, … Read more

how to get date of yesterday using php

php how to example

how to get date of yesterday using php   <?php $test=date(‘d.m.Y’,strtotime(“-1 days”)); echo $test; ?> or <?php $test=date(‘d-m-Y’,strtotime(“-1 days”)); echo $test; ?> or <?php $test=date(‘y-m-d’,strtotime(“-1 days”)); echo $test; ?>