add-newline-to-output
Use when printf statements output strings without trailing newlines
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Use when printf statements output strings without trailing newlines
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
Use when array is accessed with direct user input as index (0-based indexing)
Use when the program accesses a precomputed table using an offset (e.g., arr[n-1]) that introduces an arithmetic operation between the symbolic input and the index
Use when loop variables iterate over character values (e.g., ASCII codes) to represent different operations or choices
Use when code uses a loop to search for an input value in an array and then uses the found index for further computation
Use when code reads a fixed number of characters into an array and only accesses individual elements
Use when code uses an array to store a single character/value that is only accessed at one index
| name | add-newline-to-output |
| description | Use when printf statements output strings without trailing newlines |
A KLEE-coverage code transformation. Applying it rewrites C source so symbolic execution explores more of the program's behavior.
When printf statements output strings without trailing newlines
Add to the end of all printf format strings that don't already have one
KLEE may handle output buffering differently for line-buffered vs unbuffered output, and newlines can help KLEE better distinguish between different execution paths by creating clearer output boundaries
Before:
#include<stdio.h>
int main()
{
int x;
scanf("%d",&x);
if(x==7||x==5||x==3)printf("YES");
else printf("NO");
}
After:
#include<stdio.h>
int main(void) {
int X;
scanf("%d", &X);
if (X == 3 || X == 5 || X == 7)
printf("YES\n");
else
printf("NO");
}
b388c8c4