This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

sscanf problem in code composer studio

Other Parts Discussed in Thread: MSP430FR6989

    #include<stdio.h>
    #include<string.h>
   
    int main()
    {
        #include <stdint.h>
        char str[] = "12";
        int16_t  timerClkSource =5;
        sscanf( str, "%d", &timerClkSource );
    }

I expected the below code to return 12 but its returning 5.I am compiling code for msp430fr6989 micro controller using ccs . MSP430 is 16 bit micro controller.

I can able to run the above code in precision32 ide for 32 bit Micro controller, where it returns expected value 12.

May i know where is the issue?

I am using CCS 5.5.0.00077