July 7, 2021 in C and CPP
Which of the following cannot be passed to a function?
1.1 Which of the following cannot be passed to a function?
A) Reference variables
B) Objects
C) Header files
D) Array
July 7, 2021 in C and CPP
1.1 Which of the following cannot be passed to a function?
A) Reference variables
B) Objects
C) Header files
D) Array
July 7, 2021 in C and CPP
c) Write a program to copy a file into another file.
July 7, 2021 in C and CPP
b) Explain the difference between text mode and binary mode files.
July 7, 2021 in C and CPP
a) Enumerate the difference between:
i) structures and union
ii) union and enum
July 7, 2021 in C and CPP
b) Write a program to find greatest number in an array.
July 7, 2021 in C and CPP
a) Assume following code:
int dat = 100;
int *var
var = &dat;
Here dat is an integer variable and var is a pointer. Answer the output of the following
statements, in this regards and explain your answer.
i) printf(“%d”, * var);
ii) printf(“%d”, (* var)++);
iii) printf(“%d”, var);
iv) printf(“%d”, -var);
July 7, 2021 in C and CPP
c) Assuming ip is a pointer; explain the function of following statements:
i) ip = ip + 5;
ii) ip = ip – 10;
iii) ip –
iv) *ip++
v) *ip –
July 7, 2021 in C and CPP
b) Write a program using pointer to find greatest number in an array.
July 7, 2021 in C and CPP
a) Explain the difference between logical and bitwise operator.
July 7, 2021 in C and CPP
c) Explain the following:
i) static variable
ii) auto variable
iii) register variable