modelscope.cn

c

C programming with memory management, pointers, structs, and system-level development. Use for .c files.

Installation

$ npx skills add https://modelscope.cn

Also in this package

Other skills from modelscope.cn · top by installs.

npx skills add https://modelscope.cn

Browse all from modelscope.cn

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,160 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

C

The foundational language for modern computing, operating systems, and embedded systems.

When to Use

  • Operating Systems / Drivers
  • Embedded Systems
  • High-performance computing
  • Legacy codebases

Quick Start

#include <stdio.h>

int main() {
    printf("Hello, World!\n");
    return 0;
}

Core Concepts

Pointers

Variables that store memory addresses.

int x = 10;
int *p = &x; // p holds address of x
printf("%d", *p); // Dereference p to get 10

Memory Management

Manual allocation and deallocation.

int *arr = (int*)malloc(10 * sizeof(int));
// use arr...
free(arr);

Structs

User-defined data types.

Best Practices

Do:

  • Always initialized variables
  • Check return values of malloc
  • Guard against buffer overflows (use snprintf over sprintf)
  • Use tools like Valgrind to check for leaks

Don't:

  • Return pointers to local variables (stack memory)
  • Use gets() (unsafe)

References