Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
顺序表的实现——静态分配
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Clojure
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Rust
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Layout:
Vertical
Horizontal
//g++ 7.4.0 // 顺序表 静态分配 #include<stdio.h> typedef int ElemType; #define MaxSize 10 typedef struct { ElemType data[MaxSize]; int length; }SqList; void InitList(SqList &L) { //for(int i=0; i<MaxSize; i++) // L.data[i]=0; L.length=0; } int main() { SqList L; InitList(L); for(int i=0; i<MaxSize; i++) printf("data[%d]=%d\n", i, L.data[i]); return 0; }
g++
Show compiler warnings
[
+
] Compiler args
[
+
]
Show input
edit mode
|
history
|
discussion