Search
 
SCRIPT & CODE EXAMPLE
 

C

%s and string pointer

#include<stdio.h>

int main()
{
    char str[6] = "Hello";
    int i;

    /*
     * str+0 will print "Hello"
     * str+1 will print "ello"
     * str+2 will print "llo"
     * str+3 will print "lo"
     * str+4 will print "o"
     */
    for(i = 0; str[i]; i++)
        printf("%s
",str+i);

    return 0;
}
Comment

PREVIOUS NEXT
Code Example
C :: C static libraries (creating object files) 
C :: diamond dataset in r 
C :: how to make C program blink on screen 
C :: #define _TIMESPEC_DEFINED struct timespec { time_t tv_sec; long tv_nsec; }; 
C :: until command lldb 
C :: minimun number of moves in c 
C :: remove every appearance of char without malloc in c 
C :: How to scale all columns in dataframe in R? 
C :: C Change Value of Array elements 
C :: c++ to assembly language converter online 
C :: como hacer para que una salida en linux aparezca de poco en poco 
C :: converting time in c 
C :: c byte vs char 
C :: command to perform safe shutdown in unix 
C :: Sum of upper & lower triangles elements 
C :: maximum, minimum, mean, and median of the data set. in array c programming 
C :: captive portal esp8266 
C :: fread condition 
C :: online c compiler with mpi 
C :: Program optimization 
C :: bucket sort 
C :: c make list 
C :: rpobleme valgrind 
Dart :: circle avatar from image asset flutter 
Dart :: dateTime.now addyears dart 
Dart :: dismiss keyboard flutter 
Dart :: constrainedbox flutter 
Dart :: slice string dart 
Dart :: increase text size of Test flutter 
Dart :: dart move item in list 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =