Hello friends in this post i am going to share The instructions that a beginner programmer must follow while making a C program.If we are able to drive these problems out then we can be a good programmer.These problems are very common and sometimes they frustrate the students.Consequently, students think that programming is very difficult.So if you are a beginner then you should think programming is very easy and you can do it .The most important thing in learning programming is the interest of domain.You are interested then you will learn easily.So generate your interest ....
Here are the key points....
1.ALWAYS START WITH ZERO LEVEL
If you want to learn somethig and you dont know the abc of that thing then you must start with the basics and gradually you will learn more and more concepts till the advanced topics.Now a days the students want to learn the advanced concepts before learning the basics.
2.READABILITY
Use tab in the program so the you will find it easy to counter errors in your program . Don't make the code complex.
3.ALWAYS FIND THE ALTERNATE SOLUTION
If you are making a program then you must find the alternative way to solve the problem.This will boost your logical skill.
4.SEARCH AND RESEARCH
Search and research on internet so that you will aware of the new things .you will come across a lot of things that will help you in learning the typical things.
5.PRACTICE
Do practise a lot to get experience in coding.You will learn key concepts and will be aware of errors .
6.CREATE INTEREST
Create interest in making program then you will learn fast and grab the things easily.
Search the querry that you have on internet or ask your teachers without any hesitations.
Thank you for visiting us ......happy coding.......
we will come with new facts and figure ,tips and tricks so visit again...
we always create a program in C and C++ programming language and the most important thing is that we create a main function in every program.We are also taught by the teachers that we can not create a C program without main function .As we know main is a user defined function so can we make a C program without main function?
Yes we can....
So in this post i will show you how to achieve this task.
here is the code...
#include<stdio.h>
#include<conio.h>
#define begin main
int begin()
{
clrscr();
printf("This program is without main function");
getch();
return 0;
}
This program will compile and run successfully .
So this was all for this post we will come with new and interesting typical programmming in C that make a lot of fun.
Hello friends we always want to do something new so that we can improve ourselves in every field of our lives.
Here i have created a program of 3d animation in C language .I have used turbo C++ compiler for this and also recommend you to use if you are running this program.Its ouput is pretty much cool and you can customize it your own so enjoy it....
I have used a header fileshashi.h which is created by me because this project is created in codeblocks compiler.so if you are trying to create it in turbo c++ then there is no need to include shashi.h header file and you have to use textcolor() insted of setcolor().
The code is here.
#include<time.h>
#include<conio.h>
#include<stdio.h>
#include<dos.h>
#include<stdlib.h>
#include<shashi.h>//contains the definition of gotoxy,setcolor etc.
Today i am sharing the code for animated heart in c++
#include<conio.h>
#include<iostream>
#include<conio.h>
#include<stdlib.h>
#include<dos.h>
#include<shashi.h> // header file is created by me which contains the definitions of delay,setcolot,gotoxy,and some others functions
using namespace std;
void heart()
{ int i,j,n=3;
while(1)//for infinately use for the heart to be created.
{ n=3;
delay(500);
setcolor(10);
cout<<"\n\n\t";
for(i=1;i<=n;i++)//loop for upper part
{ setcolor(i+5);//IN Turbo C++ use "textcolor" instead of setcolor
delay(500); //Delay is used to delay the program execution
for(int j=1;j<=(n-i);j++)//loop for space for upper part
cout<<" ";
for(j=1;j<=i+2;j++)//upper part 1st tomb pattern
{cout<<"* ";
setcolor(i+j);
}
cout<<"\n\t";
}
gotoxy(20,20);cout<<"::Created by shashi::";//gotoxy is used to set cursor position rowwise and columnwise
delay(500);
system("cls");//In Turbo C++ use clrscr() in place of system("cls")
}//End of while loop
We write a lot of programs and functions and became happy after finishing it but
we must care for their complexity in terms of space as well as time.The program or algorithm which takes less time and less memory is the best .So ,if we want to find the time spent by a function then must use the piece of code given below..........
//C program to find time spent by a function
#include<conio.h>
#include<stdio.h>
#include<time.h>
#include<stdlib.h>
#include<dos.h>
int main()
{
int i=0,time_spent;
clock_t begin;
begin=clock();
for(;i<10;i++)
{ time_spent=(int)(clock()-begin)/CLOCKS_PER_SEC;
printf("shashi ");
delay(1000);//delays the execution for 1 sec
}
printf("time spent by the function =%d second",time_spent);
Hello friends in this post i will give you an idea about how to change Turbo C++ compiler's editors background which is blue by default .Most of the students do not know that it can be changed and we can customise it our own .The turbo C++ gives the freedom to change the color of every part of the compiler.This is very funny and you will really enjoy doing it .This is the picture after changing the color of the compiler.
Now for doing this go to option menu then select environment then select color from dropdown menu.
Then you have to select edit window and on the half right side you have to change the background color for each and every part .But you must care for that the foreground and background for one part must not be same otherwise it will be invisible.