Posts

Showing posts from June, 2023

Hacker Rank C Challengers #002

 Task Complete the function void update(int *a,int *b). It receives two integer pointers, int* a and int* b. Set the value of  to their sum, and  to their absolute difference. There is no return value, and no return statement is needed. Input Format The input will contain two integers,  and , separated by a newline. Output Format Modify the two values in place and the code stub main() will print their values.  Note: Input/ouput will be automatically handled. You only have to complete the function described in the 'task' section. Sample Input 4 5 Sample Output 9 1 So I created this Program :- Note : I import <math.h> header for use "abs " Command in Oder to get the absolute value .   #include   < stdio.h > #include   < math.h > void  update( int  *a, int  *b) {      // Complete this function       *a=*a+*b;     *b=abs(*a-( 2 **...

Hacker Rank C Challenges #001

Write a function  int max_of_four(int a, int b, int c, int d)   which reads four arguments and returns the greatest of them. here is the code I programmed #include   < iostream > #include   < cstdio > using   namespace  std; /* Add `int max_of_four(int a, int b, int c, int d)` here. */ int  max_of_four( int  a , int  b , int  c, int  d){      int  max= 0 ;      int  i;      for  (i= 1  ; i< 4  ; i++){          if  (max < a) {             max = a;         }          if  (max < b) {          ...

HTB - Starting Point - #001

Image
 #001 - Meow Machine Setting Up VPN Connection 1. select the button red coloured " connet to HTB" 2. then click on download VPN & download your VPN Configuration file. 3. then run the terminal on downloaded location as "SUDO". 4. Import the configuration file by bellow code.   Sudo openvpn "file name" 5. when you setup the vpn connection properly ; your ip address will displayed by changing on your right upper corner.  and also that vpn display panel on HTB will change the colour in to green.