Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Buy a domain name - Register cheap domain names from $0.99 - Namecheap

Scalable Hosting That Grows With You

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Semrush - keyword research tool

Boost your online presence with premium web hosting and servers

Disclosure: My content contains affiliate links.

39,864 questions

51,786 answers

573 users

What it the result of assigning an out-of-range value to signed char in C

1 Answer

0 votes
#include <stdio.h>

int main(void) 
{
    signed char sc;
    
    for (int i = 128; i <= 138; i++)
    {
        sc = i;
        printf("%d\n", sc);
    }
  
    return 0;
}

   
/*
run:
 
-128
-127
-126
-125
-124
-123
-122
-121
-120
-119
-118

*/

 



answered Aug 29, 2017 by avibootz

Related questions

1 answer 147 views
1 answer 188 views
1 answer 146 views
146 views asked Jul 4, 2020 by avibootz
1 answer 158 views
158 views asked Jul 3, 2020 by avibootz
2 answers 224 views
...