What is function prototype?

April 9, 2008 at 7:12 am (DOUBTS)

Function prototype means the declaration of function.

It is declared in declaration section.

Like variable we have to declare the function before its use.

eg.   void  fun(int,int);

Permalink Leave a Comment

What is the disadvantages of “linked list” over “array”?

April 8, 2008 at 11:02 am (DOUBTS)

If we want to do little work and fixed length of list,  so it would be better to use an array because using linked list it it would more time consuming than array.

     This is the the main advantages of linked over array.

Permalink Leave a Comment

Can you explain why “LINKED KIST” is introduced in C language?

April 8, 2008 at 7:18 am (DOUBTS)

Because if we yse array for sequancial organization in that case one major problem occurs that size of an array must be specified precisely at begining so we can’t perform many work in real-life application.

           Linked list is a compeletely different way to represent a list is to make each item in list of a structure and it also contains a “link” .

          Using linked list we can work many task that we can’t do using array like delete or add a element in a list.

      SO for this purpose “LINKED LIST”  is introduced in C.

Permalink Leave a Comment

PROGRAMME TO PRINT FOLLOWINT

March 15, 2008 at 6:59 am (DOUBTS)

1

23

345

456

5678

6789

————————————————————————————————————————————————————————————–

#include<stdio.h>

#include<conio.h>

void main()

{

int i=3,j,k=5,n,cnt=0;

clrscr();

printf(“enter any number : “);

scanf(“%d”,&n);

printf(“%3d”,1);

printf(“\n%3d%3d\n”,2,3);

for(i=3;i<=n;i++)

{

for(j=i;j<=k+cnt;j++)

printf(“%3d”,j);

cnt++;

if(cnt%2==0)

{

k+=3;

cnt=0;

}

printf(“\n”);

}

getch();

}

Permalink Leave a Comment

Which functions are use to write in rendomly access file?

March 11, 2008 at 8:47 am (DOUBTS)

The functions are

  • fwrite();
  • fread();

Permalink Leave a Comment

A prog to print .c file without first comment line

March 11, 2008 at 8:21 am (DOUBTS)

//a prog to print the whole .c file with out first or other line which contain comment

#include<stdio.h>

#include<conio.h>

void main()

{

FILE *fp;

char c;

int cnt=0;

clrscr();

         fp=fopen(“prog.c”,”r”);

while((c=getc(fp))!=EOF)

{

      if(c==’/')

       cnt++;

       if(c=getc(fp)==’/’)

cnt++;

if(cnt==2)

while((c=getc(fp))!=’\n’);

else

printf(“%c”,c);

fclose(fp);

getch();

}

Permalink Leave a Comment

CLICK HERE TO PUT YOUR DOUBTS

March 5, 2008 at 4:21 am (DOUBTS)

Permalink 10 Comments