static bool isLogin = false;

            static std::string err;
            if (!isLogin) {
                ImGui::Text("Please Login! (Copy Key to Clipboard)");

                ImGui::PushItemWidth(-1);
                static char s[64];
                ImGui::InputText("##key", s, sizeof s);
                // auto paste
                auto key = getClipboardText();
                strncpy(s, key.c_str(), sizeof s);
				anticrack = true;
                // auto login

                err = Login(s);
                if (err == "OK") {
                    isLogin = bValid && g_Auth == g_Token;
                }
                ImGui::PopItemWidth();

                ImGui::PushItemWidth(-1);
                if (ImGui::Button(" Paste Key  ", ImVec2(ImGui::GetContentRegionAvailWidth(), 0))) {
                    auto key = getClipboardText();
                    strncpy(s, key.c_str(), sizeof s);
                }
                ImGui::PopItemWidth();

                ImGui::PushItemWidth(-1);


                if (ImGui::Button("Login", ImVec2(ImGui::GetContentRegionAvailWidth(), 0))) {
                    err = Login(s);
                    if (err == "OK") {
                        isLogin = bValid && g_Auth == g_Token;
                    }
                }
                ImGui::PopItemWidth();

                if (!err.empty() && err != "OK") {
                    ImGui::Text("Error: %s", err.c_str());
                }

                ImGui::PopItemWidth();

            } else{
				{
				if (!g_Token.empty() && !g_Auth.empty() && g_Token == g_Auth) {	
					
		       	if(anticrack){
				
				
				
				static bool ic;
            static bool show;

            if(ImGui::Button(("ON"),ImVec2(80,65)))
            {
                show = true;
				
            }	   
			
			
			ImGui::SetNextWindowSize(ImVec2(600,600));
						if(show){
			ImGui::Begin("Hacks",&show,ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize );
			
			
			ImVec2 P1, P2;
	ImDrawList* pDrawList;
	const auto& CurrentWindowPos = ImGui::GetWindowPos();
	const auto& pWindowDrawList = ImGui::GetWindowDrawList();
	const auto& pBackgroundDrawList = ImGui::GetBackgroundDrawList();
	const auto& pForegroundDrawList = ImGui::GetForegroundDrawList();

	P1 = ImVec2(30.000f, 20.000f);
	P1.x += CurrentWindowPos.x;
	P1.y += CurrentWindowPos.y;
	P2 = ImVec2(120.000f, 580.000f);
	P2.x += CurrentWindowPos.x;
	P2.y += CurrentWindowPos.y;
	pDrawList = pWindowDrawList;
	pDrawList->AddRectFilled(P1, P2, ImColor(0.168f, 0.190f, 0.264f, 1.000f), 80.000f);

	P1 = ImVec2(140.000f, 20.000f);
	P1.x += CurrentWindowPos.x;
	P1.y += CurrentWindowPos.y;
	P2 = ImVec2(570.000f, 580.000f);
	P2.x += CurrentWindowPos.x;
	P2.y += CurrentWindowPos.y;
	pDrawList = pWindowDrawList;
	pDrawList->AddRectFilled(P1, P2, ImColor(0.127f, 0.168f, 0.247f, 1.000f), 80.000f);



	ImGui::SetCursorPos(ImVec2(45.000f, 56.000f));
		if (ImGui::Button(ICON_FA_SHIELD"", ImVec2(60.000f, 70.000f)))
	Settings::Tab = 1;

	ImGui::SetCursorPos(ImVec2(45.000f, 156.000f));
		if (ImGui::Button(ICON_FA_EYE_SLASH"", ImVec2(60.000f, 70.000f)))
	Settings::Tab = 2;

	ImGui::SetCursorPos(ImVec2(46.000f, 261.000f));
		if(ImGui::Button(ICON_FA_CROSSHAIRS"", ImVec2(60.000f, 70.000f)))
	Settings::Tab = 3;


	ImGui::SetCursorPos(ImVec2(45.000f, 368.000f));
		if (ImGui::Button(ICON_FA_CUBES"", ImVec2(60.000f, 70.000f)))
	Settings::Tab = 4;



	ImGui::SetCursorPos(ImVec2(45.000f, 472.000f));
		if(ImGui::Button(ICON_FA_POWER_OFF"", ImVec2(60.000f, 70.000f)))
	         {
            show = false;
                
          }

			
			ImGui::SetCursorPos(ImVec2(155.000f, 50.000f));

     	ImGui::PushStyleColor(ImGuiCol_ChildBg, IM_COL32(15, 15, 15, 0));
			ImGui::BeginChild("TextXhild#1", ImVec2(390, 490), true);
	//	ImGui::PopStyleVar();
		
	if (Settings::Tab == 1) {
ImGui::Spacing();
						  ImGui::Spacing();
						  ImGui::Spacing();
					ImGui::SetCursorPos(ImVec2(100.000f, 54.000f));
	ImGui::Text("PRIMIUM BYPASS");
						  ImGui::Spacing();
						  ImGui::Spacing();
						//  ImGui::SetCursorPos(ImVec2(250.000f, 70.000f));
	                 ImGui::Text("Loby Bypass               ");
					 ImGui::SameLine();
					 ImGui::Toggle("", &Config.Bypass);
					 ImGui::Spacing();
						  ImGui::Spacing();
					 ImGui::Spacing();
						  ImGui::Spacing();
					 ImGui::Text("Island Bypass             ");
					 ImGui::SameLine();
					 ImGui::Toggle(" ", &Config.Bypass1);
	
	
	}

		              else if (Settings::Tab == 2) {
					   					ImGui::PushStyleColor(ImGuiCol_Border, IM_COL32(15, 15, 15, 0));
						  ImGui::Spacing();
						  ImGui::Spacing();
						  ImGui::Spacing();

								
						            ImGui::SetCursorPos(ImVec2(10, 45));

			                        ImGui::BeginGroup();{
										ImGui::SetCursorPos(ImVec2(100.000f, 54.000f));
	ImGui::Text("Player Esp");
						  ImGui::Spacing();
						  ImGui::Spacing();
						  ImGui::Spacing();
									if (ImGui::BeginTable("split", 2));
							        {

										ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 3.5f);
									ImGui::TableNextColumn();
										
										
					                
						            ImGui::Checkbox("Line", &Config.PlayerESP.Line);
                                    ImGui::TableNextColumn();
									ImGui::Checkbox("Box", &Config.PlayerESP.Box);
                                    ImGui::TableNextColumn();
									ImGui::Checkbox("Skeleton", &Config.PlayerESP.Skeleton);
                                    ImGui::TableNextColumn();
									ImGui::Checkbox("Health", &Config.PlayerESP.Health);
									ImGui::TableNextColumn();
                                    ImGui::Checkbox("Name", &Config.PlayerESP.Name);
									ImGui::TableNextColumn();
                                    ImGui::Checkbox("Distance", &Config.PlayerESP.Distance);
									ImGui::TableNextColumn();
                                    ImGui::Checkbox("Team ID", &Config.PlayerESP.TeamID);
									ImGui::TableNextColumn();

                                    ImGui::Checkbox("LootBox", &Config.PlayerESP.LootBox);
									ImGui::TableNextColumn();
                                    ImGui::Checkbox("Vehicle", &Config.PlayerESP.Vehicle);
									ImGui::TableNextColumn();
									}
                                    ImGui::EndTable();	
									ImGui::EndGroup();
									}

               } else if (Settings::Tab == 3) {
					   
					   
ImGui::SetCursorPos(ImVec2(18, 35));
ImGui::BeginGroup();{
	ImGui::SetCursorPos(ImVec2(100.000f, 54.000f));
	ImGui::Text("Silent Menu ");
						  ImGui::Spacing();
						  ImGui::Spacing();
    //ImGui::SetCursorPos(ImVec2(345.000f, 165.000f));
	ImGui::Checkbox("Silent Aim", &Config.SilentAim.Enable);
									
							
							if (Config.SilentAim.Enable){
								
							ImGui::Text("Target     : ");
                            ImGui::SameLine();
                            static const char *targets[] = {"Head", "Chest"};
							ImGui::PushItemWidth(200);

							ImGui::Combo("##Target", (int *) &Config.SilentAim.Target, targets, 2, -1);
							ImGui::PopItemWidth();

                            ImGui::Text("Trigger    : ");
                            ImGui::SameLine();
                            static const char *triggers[] = {"Shooting", "None", "Scoping",
                                                             "Both (Shooting & Scoping)",
                                                             "Any (Shooting / Scoping)"};
							ImGui::PushItemWidth(200);
                            ImGui::Combo("##Trigger", (int *) &Config.SilentAim.Trigger, triggers, 5, -1);
							ImGui::PopItemWidth();

                            ImGui::Checkbox("Ignore Knocked", &Config.SilentAim.IgnoreKnocked);
                            ImGui::Checkbox("Visibility Check {Compulsory}", &Config.SilentAim.VisCheck);
                            ImGui::Checkbox("Ignore Bot{Compulsory}", &Config.SilentAim.IgnoreBot);
	
							ImGui::EndGroup();		
                                    }
							}
									
	      } else if (Settings::Tab == 4) {
			  ImGui::SetCursorPos(ImVec2(18, 30));
ImGui::BeginGroup();{
					   

					     
			  for (auto &i : items_data) {
              for (auto &item : i["Items"]) {
			  ImGui::Spacing();
               ImGui::Checkbox(item["itemName"].get<std::string>().c_str(),
               (bool *) &Items[item["itemId"].get<int>()]);
                               
			                
		}
        }	 
									
									 
										  
										  ImGui::EndGroup();		
										 	
                                   
	
}}
}}
}}
}
			
ImGui::EndChild();
  }

		
        ImGui::End();
        ImGui::Render();

    ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());

    return orig_eglSwapBuffers(dpy, surface);
}

int32_t (*orig_onInputEvent)(struct android_app *app, AInputEvent *inputEvent);

int32_t onInputEvent(struct android_app *app, AInputEvent *inputEvent) {
    if (initImGui) {
        ImGui_ImplAndroid_HandleInputEvent(inputEvent, {(float) screenWidth / (float) glWidth, (float) screenHeight / (float) glHeight});
    }
    return orig_onInputEvent(app, inputEvent); 

C Language online compiler

Write, Run & Share C Language code online using OneCompiler's C online compiler for free. It's one of the robust, feature-rich online compilers for C language, running the latest C version which is C18. Getting started with the OneCompiler's C editor is really simple and pretty fast. The editor shows sample boilerplate code when you choose language as 'C' and start coding!

Read inputs from stdin

OneCompiler's C online editor supports stdin and users can give inputs to programs using the STDIN textbox under the I/O tab. Following is a sample C program which takes name as input and print your name with hello.

#include <stdio.h>
int main()
{
    char name[50];
    printf("Enter name:");
    scanf("%s", name);
    printf("Hello %s \n" , name );
    return 0;
    
}

About C

C language is one of the most popular general-purpose programming language developed by Dennis Ritchie at Bell laboratories for UNIX operating system. The initial release of C Language was in the year 1972. Most of the desktop operating systems are written in C Language.

Key features:

  • Structured Programming
  • Popular system programming language
  • UNIX, MySQL and Oracle are completely written in C.
  • Supports variety of platforms
  • Efficient and also handle low-level activities.
  • As fast as assembly language and hence used as system development language.

Syntax help

Loops

1. If-Else:

When ever you want to perform a set of operations based on a condition if-else is used.

if(conditional-expression) {
   // code
} else {
   // code
}

You can also use if-else for nested Ifs and if-else-if ladder when multiple conditions are to be performed on a single variable.

2. Switch:

Switch is an alternative to if-else-if ladder.

switch(conditional-expression) {    
case value1:    
 // code    
 break;  // optional  
case value2:    
 // code    
 break;  // optional  
...    
    
default:     
 // code to be executed when all the above cases are not matched;    
} 

3. For:

For loop is used to iterate a set of statements based on a condition.

for(Initialization; Condition; Increment/decrement){  
  // code  
} 

4. While:

While is also used to iterate a set of statements based on a condition. Usually while is preferred when number of iterations are not known in advance.

while(condition) {  
 // code 
}  

5. Do-While:

Do-while is also used to iterate a set of statements based on a condition. It is mostly used when you need to execute the statements atleast once.

do {
  // code 
} while (condition); 

Arrays

Array is a collection of similar data which is stored in continuous memory addresses. Array values can be fetched using index. Index starts from 0 to size-1.

Syntax

One dimentional Array:

data-type array-name[size];

Two dimensional array:

data-type array-name[size][size];

Functions

Function is a sub-routine which contains set of statements. Usually functions are written when multiple calls are required to same set of statements which increases re-usuability and modularity.

Two types of functions are present in C

  1. Library Functions:

Library functions are the in-built functions which are declared in header files like printf(),scanf(),puts(),gets() etc.,

  1. User defined functions:

User defined functions are the ones which are written by the programmer based on the requirement.

How to declare a Function

return_type function_name(parameters);

How to call a Function

function_name (parameters)

How to define a Function

return_type function_name(parameters) {  
  //code
}