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> | |
void func(int *w, int *x, int *y, int *z); | |
void main() | |
{ | |
int data[3] = {3, 70, 700}; | |
int a, sum, *pa, *pb, *pc; | |
a = 6; | |
pa = &a; | |
pb = &data[0]; | |
pc = data + 1; |
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> | |
#define SIZE 5 | |
void func(int *, int); | |
int main(void) | |
{ | |
int ary[SIZE] = {1, 7, 3, 9, 5}; | |
func(ary, SIZE); |
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> | |
void print_r(int a[], int n); | |
int main(void) | |
{ | |
int a[] = {10, 20, 30, 40, 50}; | |
print_r(a, 5); | |
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(void) | |
{ | |
int score[10] = {1, 2, 3, 4, 5}; | |
int i, op = 2, sum = 0; | |
switch (op) | |
{ | |
case 1: | |
for (i = 0; i < 10; i++) |
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 React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import App from './App'; | |
import registerServiceWorker from './registerServiceWorker'; | |
ReactDOM.render(<App />, document.getElementById('root')); | |
registerServiceWorker(); |
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 React from 'react'; | |
import Header from './Header'; | |
import Body from './Body'; | |
const App = () => { | |
return ( | |
<div> | |
<Header text="Hello World"/> | |
<Body number={3}/> | |
</div> |
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 React, { Component } from 'react'; | |
class Body extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
number: 1 | |
}; | |
} | |
render() { |
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 React from 'react'; | |
const Header = ({ text }) => { | |
return ( | |
<div> | |
<h1>Header Props Text : {text}</h1> | |
</div> | |
); | |
}; |