Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
C - printf precision modifiers
//gcc 5.4.0 #include <stdio.h> //see http://en.cppreference.com/w/cpp/io/c/fprintf int main(void) { char* str; str = "superdooperlongstring"; printf("give me no more than 6 chars from the really looong string: '%.6s'\n", str); str = "hi"; printf("give me no more than 6 chars from the short string: '%.6s'\n", str); return 0; }
run
|
edit
|
history
|
help
0
can u explain this how its working!!
by ARaj, 3 years ago
Please
log in
to post a comment.
lab 12 v1
a.c
gcc compiler code for delay
Spring 2017 Project 2 v1.3
demo_strlen
factorial
selection sort
example of scanf and basic integer manipulation
c program for hollow rhombus
14th Dec Project1 v0.2
stackse - search stackoverflow differently
can u explain this how its working!!
by ARaj, 3 years agoPlease log in to post a comment.