Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Printf Practice | Data
C Basics
course content

Зміст курсу

C Basics

C Basics

1. Introduction
2. Data
3. Operators
4. Control Statements
5. Functions
6. Pointers

Printf Practice

Example: Using Format Specifiers and Variables in Printing

c

main

copy
123456789101112
#include <stdio.h> int main() { int iVariable = 832; float fVariable = 54.984; char cVariable = '#'; printf(" iVariable = %d \n fvariable = %f \n cVariable = %c \n", iVariable, fVariable, cVariable); return 0; }

Завдання

  • Assign the value of 100 to the variable named intVariable.
  • Choose an appropriate data type for the variable charVariable.
  • Utilize the printf() function to display the values of both variables in a single call.

Once you've completed this task, click the button below the code to check your solution.

Завдання

  • Assign the value of 100 to the variable named intVariable.
  • Choose an appropriate data type for the variable charVariable.
  • Utilize the printf() function to display the values of both variables in a single call.

Once you've completed this task, click the button below the code to check your solution.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Секція 2. Розділ 8
toggle bottom row

Printf Practice

Example: Using Format Specifiers and Variables in Printing

c

main

copy
123456789101112
#include <stdio.h> int main() { int iVariable = 832; float fVariable = 54.984; char cVariable = '#'; printf(" iVariable = %d \n fvariable = %f \n cVariable = %c \n", iVariable, fVariable, cVariable); return 0; }

Завдання

  • Assign the value of 100 to the variable named intVariable.
  • Choose an appropriate data type for the variable charVariable.
  • Utilize the printf() function to display the values of both variables in a single call.

Once you've completed this task, click the button below the code to check your solution.

Завдання

  • Assign the value of 100 to the variable named intVariable.
  • Choose an appropriate data type for the variable charVariable.
  • Utilize the printf() function to display the values of both variables in a single call.

Once you've completed this task, click the button below the code to check your solution.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Секція 2. Розділ 8
toggle bottom row

Printf Practice

Example: Using Format Specifiers and Variables in Printing

c

main

copy
123456789101112
#include <stdio.h> int main() { int iVariable = 832; float fVariable = 54.984; char cVariable = '#'; printf(" iVariable = %d \n fvariable = %f \n cVariable = %c \n", iVariable, fVariable, cVariable); return 0; }

Завдання

  • Assign the value of 100 to the variable named intVariable.
  • Choose an appropriate data type for the variable charVariable.
  • Utilize the printf() function to display the values of both variables in a single call.

Once you've completed this task, click the button below the code to check your solution.

Завдання

  • Assign the value of 100 to the variable named intVariable.
  • Choose an appropriate data type for the variable charVariable.
  • Utilize the printf() function to display the values of both variables in a single call.

Once you've completed this task, click the button below the code to check your solution.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Example: Using Format Specifiers and Variables in Printing

c

main

copy
123456789101112
#include <stdio.h> int main() { int iVariable = 832; float fVariable = 54.984; char cVariable = '#'; printf(" iVariable = %d \n fvariable = %f \n cVariable = %c \n", iVariable, fVariable, cVariable); return 0; }

Завдання

  • Assign the value of 100 to the variable named intVariable.
  • Choose an appropriate data type for the variable charVariable.
  • Utilize the printf() function to display the values of both variables in a single call.

Once you've completed this task, click the button below the code to check your solution.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Секція 2. Розділ 8
Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
We're sorry to hear that something went wrong. What happened?
some-alt