This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() { | |
int arr[] = {10, 20, 30, 40}; | |
int *ptr = arr; | |
*(ptr + 1) = 25; | |
ptr += 2; | |
*ptr = 35; | |
for (int i = 0; i < 4; i++) | |
printf("%d ", arr[++i]); | |
return 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() { | |
int arr[] = {10, 20, 30, 40}; | |
int *ptr = arr; | |
*(ptr + 1) = 25; | |
ptr += 2; | |
*ptr = 35; | |
for (int i = 0; i < 4; i++) | |
printf("%d ", arr[++i]); | |
return 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() { | |
int arr[] = {10, 20, 30, 40}; | |
int *ptr = arr; | |
*(ptr + 1) = 25; | |
ptr += 2; | |
*ptr = 35; | |
for (int i = 0; i < 4; i++) | |
printf("%d ", arr[++i]); | |
return 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn fill_vec(vec: Vec<i32>) -> Vec<i32> { | |
vec.push(88); | |
vec | |
} | |
fn main() { | |
let mut vec0 = vec![22, 44, 66]; | |
let vec1 = fill_vec(vec0); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() { | |
int x = 1 << 30; | |
int y = 1; | |
cout << (x << y) << endl; | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
template <typename T> | |
void func(T&& t) { | |
T y = t; | |
t += 3; | |
std::cout << y << " "; | |
} | |
int main() { | |
int c = 5; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn get_char(data: String) -> char { | |
data.chars().last().unwrap() | |
} | |
fn string_uppercase(mut data: &String) { | |
data = data.to_uppercase(); | |
println!("{data}"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Clarity from 'clarity'; | |
Clarity.initialize('YOUR_CLARITY_TRACKING_CODE'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm install clarity@latest | |
yarn add clarity@latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const obj = { | |
value: 29, | |
method: function() { | |
const nested = () => { | |
console.log("LOG 1: ",this.value); | |
}; | |
nested(); | |
} | |
}; |
NewerOlder