Skip to main content

Transfer google play balance to Paytm, PhonePe, Google Pay or any UPI linked bank account.

To transfer google play balance, opinion rewards or gift cards to PayPal, Paytm, PhonePe, Google Pay or any UPI ID linked bank account , you can use QxCredit :Rewards Convertor app which is available on google play store: You will get back 80% of the google play balance. App link:  https://play.google.com/store/apps/details?id=qxcoding.qx_credit_reboot Follow these steps to transfer your play balance to paypal or UPI: 1) download app from play store. 2) login with your google account and phone number. 3) choose a token amount which you want to convert/transfer. 4) Enter your payout details.(UPI ID or PayPal Email) 5) wait for an acknowledgement mail form qxcredit containing information about your purchased token. 6) you will receive the amount within 3 days. 7) if you face any issues you can raise a query on website: https://qx-credit.web.app/#/contact_support About app: Introducing QxCredit : Rewards Converter Convert /Transfer or Exchange your Google Play Balance and opini...

How to find and replace a node in Linked List



For replacing an element in a linked list first we have to find it , for that we will use a function which will do the finding part and give us the node's address (pointer) and then we will replace the value of that node by the value given by the user.
Definition of node* find_pos(int) function

node* find_pos(int val,int p){
     node* cur=first;
     node* prev=cur;
     while(cur->val!=val){
         prev=cur;
         cur=cur->next;
         if(cur==NULL)return NULL;
     }
     switch(p){
         case 0: return cur;
         case 1: return cur->next;
         default:return prev;
     }
 }
The above function keeps track of the previous node and keep traversing through the linked list until we find the value which is to be replaced, it return the previous node if value of p is -1 or returns current node if p=0 or next one if p=1.
Definition of find_replace function
void find_replace(int find,int replace){
     int c=0;
     while(node *temp=find_pos(find,0)){
         c++;
         temp->val=replace;
     }
     printf("%d values replaced \n",c);
 }
This function just replace the value of the node which is returned by the find_pos(int) function.
The complete implementation of the linked list is given below along with the output.


For downloading Executable program click here :

SOURCE CODE :

#include <stdio.h>     //   https://www.qxcoding.com/
#include<stdlib.h>
#include<conio.h>
struct node{
 int val;
 node* next;
}*first=NULL;
void insert(int val);
void display();
void delete_list(node* temp=first);
node* find_pos(int val,int p=-1);
void find_replace(int find,int replace);
int main(int argc, char *argv[]) {
 int val,val1;
 printf("Enter the values to be inserted in linked list press -1 to stop\n");
 scanf("%d",&val);
 while(val!=-1){
  insert(val);
  scanf("%d",&val);
 }
 display();
 printf("Enter the value to be replaced and the replacing value\n");
 scanf("%d%d",&val,&val1);
 find_replace(val,val1);
 printf("Succesfull\n");
 display();
 printf("\n\n De-allocating memory\n");
 delete_list();
 getch();
 return 0;
}
void insert(int val){
 node* n=(node*)malloc(50);
 n->val=val;
 n->next=NULL;
 if(first==NULL)
  first=n;
 else{
  node* temp=first;
  while(temp->next)temp=temp->next;
  temp->next=n;
 }
}
void display(){
 node* temp=first;
 if(first==NULL){printf("Empty linked list\n");return;}
 while(temp){
  printf("%d  ",temp->val);
  temp=temp->next;
 }
 printf("\n");
}
node* find_pos(int val,int p){
 node* cur=first;
 node* prev=cur;
 while(cur->val!=val){
  prev=cur;
  cur=cur->next;
  if(cur==NULL)return NULL;
 }
 switch(p){
  case 0: return cur;
  case 1: return cur->next;
  default:return prev;
 }
}
void find_replace(int find,int replace){
 int c=0;
 while(node *temp=find_pos(find,0)){
  c++;
  temp->val=replace;
 }
 printf("%d values replaced \n",c);
}
void delete_list(node* temp){
 static int del=0;
 if(temp->next==NULL)
  {delete(temp);del++;}
 else{
  delete_list(temp->next);
  delete(temp);del++;
 }
 printf("%d deleted\n",del);
}
 

if any doubts or queries please comment ðŸ™‚

Comments

  1. this source code is not working, please try

    ReplyDelete

Post a Comment

Popular posts from this blog

Transfer google play balance to Paytm, PhonePe, Google Pay or any UPI linked bank account.

To transfer google play balance, opinion rewards or gift cards to PayPal, Paytm, PhonePe, Google Pay or any UPI ID linked bank account , you can use QxCredit :Rewards Convertor app which is available on google play store: You will get back 80% of the google play balance. App link:  https://play.google.com/store/apps/details?id=qxcoding.qx_credit_reboot Follow these steps to transfer your play balance to paypal or UPI: 1) download app from play store. 2) login with your google account and phone number. 3) choose a token amount which you want to convert/transfer. 4) Enter your payout details.(UPI ID or PayPal Email) 5) wait for an acknowledgement mail form qxcredit containing information about your purchased token. 6) you will receive the amount within 3 days. 7) if you face any issues you can raise a query on website: https://qx-credit.web.app/#/contact_support About app: Introducing QxCredit : Rewards Converter Convert /Transfer or Exchange your Google Play Balance and opini...

What is AI (Artificial Intelligence )? and its characteristics

Definition : Artificial intelligence  (AI) is the ability of a  computer program  or a  machine  to think and learn. It is also a field of study which tries to make computers "smart". They work on their own without being encoded with commands. Types of AI : REACTIVE MACHINES:  The most basic type of AI is purely reactive ,it does not store any memory of past or predict ( calculate ) future happenings. This type of AI is only applicable to specific applications and the principle is choosing the best decision among several options. examples: Deep Blue, IBM’s chess-playing supercomputer LIMITED MEMORY :  this type 2 kind of AI machines are distinct from reactive machine in such a way that it can make optimum decisions based on the past information ( data ). examples: self driving cars. THEORY OF MIND:  The understanding that people,creatures and objects can have thoughts or emotions which effect their own behavior. ...

How to convert google play balance to paypal or UPI [2024]

If your google account contains play balance which you might have earned from google competitions, opinion rewards or gift vouchers, you can transfer the amount to paypal account or any UPI linked bank account.  For transferring the play balance you need to follow 3 simple steps :  1) Download QxCredit app from google play store:                                 2) Purchase a token of your choice by entering the payout details :            3) View your purchase in my tokens section and wait for 72 hours for the transaction to be verified and processed. The below video demonstrates the process of purchasing a token of your choice to convert play balance: After purchasing token you will also receive a confirmation mail from QxCredit regarding the purchased token information. You can also view your purchased token on QxCredit website:...