What is the output of the following code? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 2

What is the output of the following code?

#include<stdio.h> int main() { void n=5; printf("%v",n); return 0; }

29th May 2019, 12:48 PM
Srija Padmanabhuni
2 Respostas
+ 7
Srija Padmanabhuni hi, An object of void type cannot be declared. But void pointers can be defined. If you want to use void then use it directly as void doesn't contain any value #include <stdio.h> int main() { printf ("%v",5); return 0; } void pointers example int a = 5; char b = 'x'; void *p = &a;Ā  // void pointer holds address of int 'a' p = &b; if you have any query then ping me have this šŸŽ šŸŽ šŸŽ šŸŽ šŸŽ
29th May 2019, 12:59 PM
DishaAhuja
DishaAhuja - avatar
+ 2
Thank you šŸ˜Š DishaAhuja
29th May 2019, 1:14 PM
Srija Padmanabhuni