online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include<stdio.h> #include <stdlib.h> int main(){ int n; printf("Input total number of elements(1 to 100): "); scanf("%d",&n); float *ptr=(float*)calloc(n,sizeof(float)); if(ptr==NULL) { printf(" No memory is allocated."); exit(0); } printf("\n"); for(int i=0;i<n;++i) { printf(" Number %d: ",i+1); scanf("%f",ptr+i); } for(int i=1;i<n;++i) { if(*ptr<*(ptr+i)) *ptr=*(ptr+i); } printf(" The Largest ptr is : %.2f \n\n",*ptr); return 0; }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue