w3schools Logo
Monday 06 February 2012
w3schools.in Developer Network Made in INDIA
Learn C Programming
Learn C++ Programming
HTML tutorials
CSS tutorials
php tutorials and scripts
MySql tutorials
Operating system

Sign in


Not a member yet?

join w3schools.in









w3schools.in is a community for professionals, students, employers, employees, amateurs, experts, hobbyists and for everyone else who have interest in web and Computer Graphics. Our goal is to bring everyone together on one platform so that they can interact with and learn from each other, and also increase their business network.
Here you will find high quality HTML and PHP articles, Quick Start PHP MySql tutorials and scripts that’s practical and real-life examples of actual scripts will help to you learn programming. Whether a beginner or an expert, we cover everything from the fundamentals to our new exciting category quickly.
"Education is the Best Friend. An Educated Person is Respected Everywhere. Education beats the Beauty and the Youth."
Tools Web Services
Try Yourself Editor
Try-Yourself
With our "Try Yourself" editor you can experiment with HTML, CSS, XML, JavaScript, and see the result in your browser.
Popular Pages

Top SQL Performance Tips Top 1000 SQL Performance Tips Interactive session from MySQL Camp I: Specific Query Performance Tips (see also database design tips for tips on indexes): Use EXPLAIN to profile the query execution plan Use Slow Query Log (always have it on!) Don't use DISTINCT when you have or could use GROUP BY Insert performance Batch INSERT and REPLACE Use LOAD DATA instead of INSERT LIMIT m,n may not be as fast as it soun...
C program to display the multiplication table of a given num Program: Multiplication table of a given number #include <stdio.h> int main() { int num, i = 1; printf("\n Enter any Number:"); scanf("%d", &num); printf("Multiplication table of %d: \n", num); while (i <= 10) { printf("\n %d x %d = %d", num, i, num * i); i++; } return 0; } Output: Enter any Number:5 5 x 1 = 5 5 x 2 = 10 5 x 3 = 15 5 x 4 = 20 5 x 5 = 25 5 x 6 = 30 5 x 7 = 35 5...
C program which asks the user for a number between 1 to 9 C program which asks the user for a number between 1 to 9 and shows the number. If the user inputs a number out of the specified range, the program should show an error and prompt the user for a valid input. Program: Program for accepting a number in a given range. #include<stdio.h> int getnumber(); int main() { int input = 0; //call a function to input number from key board input = getnumber(); //when input is not in the range of 1 to 9,print error...
C program to find the number of lines in a text file Number of lines in a file can be determined by counting the number of new line characters present. Program: Program to count number of lines in a file. #include <stdio.h> int main() /* Ask for a filename and count number of lines in the file*/ { //a pointer to a FILE structure FILE *fp; int no_lines = 0; //consider 40 character string to store filename char filename[40], sample_chr; //asks user for file name printf("Enter file name: "); ...
C program to replace a specified line in a text file Program: Program to replace a specified line in a text file. #include <stdio.h> int main(void) { FILE *fp1, *fp2; //'filename'is a 40 character string to store filename char filename[40]; char c; int del_line, temp = 1; //asks user for file name printf("Enter file name: "); //receives file name from user and stores in 'filename' scanf("%s", filename); fp1 = fopen(filename, "r"); //open file in read mo...
C program to delete a specified line from a text file In this program, user is asked for a filename he needs to change. User is also asked for the line number that is to be deleted. The filename is stored in 'filename'. The file is opened and all the data is transferred to another file except that one line the user specifies to delete. Program: Program to delete a specific line. #include <stdio.h> int main() { FILE *fp1, *fp2; //consider 40 character string to store filename char filename[40]; char c;...
C program to concatenate two strings without using strcat strcat(string1,string2) is a C standard function declared in the header file string.h The strcat() function concatenates string2, string1 and returns string1. Program: Program to concatenate two strings #include<stdio.h> #include<string.h> char *strct(char *c1, char *c2); char *strct(char *c1, char *c2) { //strlen function returns length of argument string int i = strlen(c1); int k = 0; //loops until null is encountered and appends string c2 to c1 w...