C - Variables and Data Types
Which of the following C code snippets correctly stores a user's age and then increments it by 1?
int age = 20;
age = age + 1;
printf("%d", age); initializes age to 20 before incrementing.int age = 20;
age = age + 1;
printf("%d", age); updates age by adding 1 and then prints it.age uninitialized; C prints incremented value without updating variable.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions