No products in the cart.

Ask questions which are clear, concise and easy to understand.

Ask Question
  • 0 answers
  • 0 answers
  • 0 answers
  • 0 answers
  • 1 answers

Deepa Sanil 7 years, 4 months ago

You can use Dev-C++, Borland C++ etc.

  • 1 answers

Rachna Gupta 7 years, 5 months ago

Refer videos on cbse guide app .They explain each and every concept clearly. You will surely built interest in the topic by watching those videos.

Hope it helps!

Thank you.

  • 1 answers

Naveen Sharma 7 years, 8 months ago

Ans. Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insertion sort removes one element from the input data, finds the location it belongs within the sorted list, and inserts it there. It repeats until no input elements remain.

  • 1 answers

Deepa Sanil 7 years, 4 months ago

random(n) function returns a random number between 0 and n-1 while randomize() function stores the initial value for the random numbgenerator.

  • 1 answers

Deepa Sanil 7 years, 4 months ago

Add the size of all data members of the same class and sum of size of all data members of its base classe(s).

  • 1 answers

Lokendra Soni 7 years, 8 months ago

<pre> #include<iostream> #include<conio.h> using namespace std; void mergesort(int *,int,int); void merge(int *,int,int,int); int a[20],i,n,b[20];   main() { cout <<"\n enter no of elements"; cin >> n; cout <<"enter the elements"; for(i=0;i<n;i++) cin >> a[i]; mergesort(a,0,n-1); cout <<" numbers after sort"; for(i=0;i<n;i++) cout << a[i] << " "; getch(); }   void mergesort(int a[],int i,int j) { int mid; if(i<j) { mid=(i+j)/2; mergesort(a,i,mid); mergesort(a,mid+1,j); merge(a,i,mid,j); } } void merge(int a[],int low,int mid ,int high) { int h,i,j,k; h=low; i=low; j=mid+1; while(h<=mid && j<=high) { if(a[h]<=a[j]) b[i]=a[h++]; else b[i]=a[j++]; i++; }   if( h > mid) for(k=j;k<=high;k++) b[i++]=a[k]; else for(k=h;k<=mid;k++) b[i++]=a[k];   cout <<"\n"; for(k=low;k<=high;k++) { a[k]=b[k]; cout << a[k] <<" "; }   }</pre>

 

Source: <a href="http://electrofriends.com/source-codes/software-programs/cpp-programs/cpp-basic-programs/c-programs-for-sorting-a-given-numbers-in-ascending-order-using-merge-sort/">Electrofriends</a>

  • 1 answers

Deepa Sanil 7 years, 4 months ago

#include <iostream.h>

#include<conio.h>

#include<process.h>

struct node

{ int info;

node *next;

};

node *top,*newptr,*temp,*ptr;

node *createnode(int);

void push(node*);

void display(node*);

void pop();

void main()

{clrscr();

top=NULL;

int ch,info;

char ch1,ch2;

do {

clrscr();

cout<<"\n \n1. Push \n2. Pop\n3. Display \n4. Exit\n";

cout<<"\nEnter your choice : ";

cin>>ch;

switch(ch)

{

case 1:

cout<<"Enter the item : ";

cin>>info;

newptr=createnode(info);

push(newptr);

break;

case 2:

cout<<"Do u want to delete the first node?";

cin>>ch1;

if(ch1=='y'||ch1=='Y')

pop();

cout<<"Now the list is:\n";

display(top);

break;

case 3:

display(top);

break;

case 4:

exit(0);

default:

cout<<"Invalid choice. Please try again. \n";

} cout<<"\n\nDo u want to continue";

cin>>ch2;

} while(ch2=='y');

getch();

}

node* createnode(int n)

{

ptr=new node;

ptr->info=n;

ptr->next=NULL;

return ptr;

}

void push(node* np)

{

if(top==NULL)

top=np;

else

{

temp=top;

top=np;

np->next=temp;

}

cout<<"\nItem inserted:"<<np->info;

}

void pop()

{

if(top==NULL)

cout<<"Underflow!!\n";

else

{

ptr=top;

top=top->next;

delete ptr;

}

}

void display(node* np)

{

while(np!=NULL)

{

cout<<np->info<<"-->";

np=np->next;

}

cout<<"\n";

}

  • 1 answers

Naveen Sharma 7 years, 9 months ago

Ans. GPRS (General Packet Radio Service) is a service within the GSM network, just like the two most popular services SMS and voice connections. GPRS is used for transmitting data in the GSM network in from of packets.

 

<font color="#222222" face="Roboto-Regular, HelveticaNeue, Arial, sans-serif">Working of GPRS</font>: In GSM cell phone systems, there will always be idle radio capacity. This is the capacity of a network provider that is not being used and it stays unused until other cell phone users decide to make phone calls. GPRS uses this idle radio capacity to establish a data network to be used for data transmission. If a network provider's idle radio capacity decreases, which means a lot of phone calls are being serviced, data transmission and speed decreases as well. Cell phone calls have a higher priority than Internet data transmission in cell phone network providers.

  • 1 answers

Naveen Sharma 7 years, 10 months ago

  1. seekg : Sets the position of the get pointer. The get pointer determines the next location to be read in the source associated to the stream. 

Syntax: seekg ( position );
Using this function the stream pointer is changed to the absolute position (counting from the beginning of the file).
seekg ( offset, direction );
Using this function, the position of the get pointer is set to an offset value relative to some specific point determined by the parameter direction. offset is of the member type off_type, which is also an integer type. And direction is of type seekdir, which is an enumerated type (enum) that determines the point from where offset is counted from.

2. seekp The seekp method changes the location of a stream object's file pointer for output (put or write.)  In most cases, seekp also changes the location of a stream object's file pointer for input (get or read.)
seekp ( position );
Using this function the stream pointer is changed to the absolute position (counting from the beginning of the file).
seekp ( offset, direction ); 
Using this function, the position of the put pointer is set to an offset value relative to some specific point determined by the parameter direction. offset is of the member type off_type, which is also an integer type. And direction is of type seekdir, which is an enumerated type (enum) that determines the point from where offset is counted from 


3. tellg The tellg() function is used with input streams, and returns the current "get" position of the pointer in the stream.
Syntax:  pos_type tellg();
It has no parameters and return a value of the member type pos_type, which is an integer data type representing the current position of the get stream pointer.

4. tellp : Returns the absolute position of the put pointer. The put pointer determines the location in the output sequence where the next output operation is going to take place. 
Syntax: pos_type tellp();

The tellp() function is used with output streams, and returns the current "put" position of the pointer in the stream. It has no parameters and return a value of the member type pos_type, which is an integer data type representing the current position of the put stream pointer.

  • 1 answers

Lokendra Soni 7 years, 8 months ago

Be a compiler and think like a compiler.

Source: <a href="http://geekodour.blogspot.in">Geekodour</a>

Or you can make your program and run it on any PC software like <a href="https://turboc.codeplex.com/"> TurboC++</a>

Or any online compiler like <a href="https://www.tutorialspoint.com/compile_cpp_online.php">Tutorial point C++ coding ground</a>

Happy coding :)

myCBSEguide App

myCBSEguide

Trusted by 1 Crore+ Students

Test Generator

Test Generator

Create papers online. It's FREE.

CUET Mock Tests

CUET Mock Tests

75,000+ questions to practice only on myCBSEguide app

Download myCBSEguide App