Nettet#include main() { int a = 1; printf("size of a is %d, ", sizeof(++a)); … Nettet1: A string is a collection of characters terminated by '\0'. 2: The format specifier %s is used to print a string. 3: The length of the string can be obtained by strlen (). 4: The pointer …
What is sizeof() in C MCQ - Know Program
Nettetprintf() statement within another printf() statement in C; printf() examples/variations in C; C program to calculate profit or loss; Calculate the distance between two cities from … Nettet#include union { int ival; float fval; } u; void main () { printf("%d", sizeof( u)); } a) 16 b) 8 c) 4 d) 32 View Answer Answer: c Explanation: None. 8. What will be the output … how to say bitter in spanish
实例讲解c语言结构体大小 sizeof(struct A) - CSDN博客
NettetOutput: 4 Since the size of a union is the size of its maximum datatype, here int is the largest hence 4. A.5, B.4, C.8, D.9 NettetHere in this question, we have 3 type of pointers that is near, far and huge. And by default in c we have near pointer, for eg: int *p, here size of (p) would be 2 bytes in 16 bit complier. But here far and huge pointers are also being used and there sizeof is 4 bytes. P.S: Forget about char size as here main focus is on near, far and huge ... Nettet#include int main() { printf("%d\t",sizeof(6.5)); printf("%d\t",sizeof(90000)); printf("%d",sizeof('A')); return 0; } A 4 4 1 B 16 8 4 C 8 4 2 D 4 2 1 Share this MCQ This MCQ quiz tests your knowledge of data types in the C programming language. how to say biuro in polish