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 argc, char const *argv[]) { | |
int a = 10; | |
int b = 20; | |
int c = 30; | |
//Pointer to variable | |
//int *newPtr; |
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> | |
#include <math.h> | |
#define rate 5 | |
struct User { | |
char name[20]; | |
int account_no; | |
float loanAmount; | |
float installments; | |
} user; |
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
package com.prathameshmore.retrofit_android; | |
import com.google.gson.annotations.SerializedName; | |
public class Post { | |
private int userID; | |
private int id; |
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
dependencies { | |
implementation fileTree(dir: 'libs', include: ['*.jar']) | |
implementation 'androidx.appcompat:appcompat:1.0.2' | |
implementation 'androidx.constraintlayout:constraintlayout:1.1.3' | |
implementation 'com.squareup.retrofit2:retrofit:2.5.0' | |
implementation 'com.squareup.retrofit2:converter-gson:2.5.0' | |
testImplementation 'junit:junit:4.12' | |
androidTestImplementation 'androidx.test:runner:1.2.0' | |
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.prathameshmore.retrofit_android"> | |
<uses-permission android:name="android.permission.INTERNET"></uses-permission> | |
<application | |
android:allowBackup="true" | |
android:icon="@mipmap/ic_launcher" | |
android:label="@string/app_name" |
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
package com.prathameshmore.retrofit_android; | |
import com.google.gson.annotations.SerializedName; | |
public class Post { | |
private int userID; | |
private int id; |
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
package com.prathameshmore.retrofit_android; | |
import java.util.List; | |
import retrofit2.Call; | |
import retrofit2.http.GET; | |
public interface JsonPlaceHolderApi { | |
@GET("posts") |
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
package com.prathameshmore.retrofit_android; | |
import androidx.appcompat.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.widget.TextView; | |
import java.util.List; | |
import retrofit2.Call; |
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
<?xml version="1.0" encoding="utf-8"?> | |
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:padding="8dp" | |
tools:context=".MainActivity"> | |
<androidx.core.widget.NestedScrollView |
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
package com.prathameshmore.retrofit_android; | |
import java.util.List; | |
import retrofit2.Call; | |
import retrofit2.http.GET; | |
public interface JsonPlaceHolderApi { | |
@GET("posts/1") |
OlderNewer