Round G 2022 - Kick Start 2022 Walktober Problem (C Code)

// Below is the Solution of the Round G 2022 -kickstart 2022 :) 

// Contact me if any question persist in your mind, I'm ready to help you :) 

// HAPPY CODING

#include <stdio.h>

int main(){

    int t,count=0;

    scanf("%d",&t);

    while(t--){

        int M,N,P,k=0,i,j;

        scanf("%d%d%d",&M,&N,&P);

        int max[N],pl[N],n[N];

        for(i=0;i<N;i++)

        max[i]=0;

        for(i=0;i<M;i++){

            for(j=0;j<N;j++){

                scanf("%d",&n[j]);

                if((i+1)!=P){

                if(max[j]<n[j])

                max[j]=n[j];

                }

                else{

                    pl[j]=n[j];

                }

            }

        }

        int ans=0;

        for(i=0;i<N;i++){

            if(max[i]>pl[i])

            ans+=(max[i]-pl[i]);

            else

            ans+=0;

        }

        printf("Case #%d: %d\n",++count,ans);

    }

    return 0;

}

Program to print the smallest word in an sentence (Coding Ninja Solutions)

#include <stdio.h>

#include <string.h> // Here I've to add this header file for strcat() function

int main() {

    char name[]="Vaibhav Yadav is good boy";

    char ccname[]=" "; // This is to add space at the end of sentence so that condition can read it.

    strcat(name,ccname); // this functions append the space to last character

    int i,j,k,min=50,count=0;

    for(i=0;name[i]!='\0';i++){

        if(name[i]!=' '){

        count++;

        }

        else{

            if(count<min)

            {

                min=count;

                k  = i;

                k-=count;

            }

                count=0;

        }

    }

    

    // printf("%d ",min);

    for(i=k;name[i]!=' ';i++)

    printf("%c",name[i]);

    k = 0;

    return 0;

}

Operator Overloading in C++

#include<iostream> using namespace std; class Complex { private: int real, imag; public: Complex(int r = 0, int i = 0){       re...