.:: Jasa Membuat Aplikasi Website,Desktop,Android Order Now..!! | | Order Now..!! Jasa Membuat Project Arduino,Robotic,Print 3D ::.

Variables Pointer Array And Files - C Programming Questions For Job Interview

0 komentar


بِسْــــــــــــــــمِ اﷲِالرَّحْمَنِ اارَّحِيم
bismillaahirrahmaanirrahiim

السَّلاَمُ عَلَيْكُمْ وَرَحْمَةُ اللهِ وَبَرَكَاتُهُ
Assalamu'alaikum warahmatullahi wabarakatuh

1. How will you change the value of a constant variable in C?
Answer:�Constant can be changed by using the pointer. Initialize a pointer to point to the value of a and then change the value using the pointer.�
#include<stdio.h>
int main()
{
const int = 5;
printf("%d", a);
int *k = (int *) &a;
*k = 10;
printf("%d", *k);
printf("%d", a);
return 0;
}

2. What is the output of the following program?
#define SQR(x) (x*x)
main()
{
int a, b = 3;
a = SQR(b + 2);
printf("%d", a);
}

a) 25
b) 11
c) Error
d) Garbage Value

Answer: b) 11.
Since it passes like (3+2) to #define, where it calculates as (3+2 * 3+2), as 1st preference is multiply & then addition, it evaluates as (3+ 2 * 3 +2) = (3+6+2)=11.


3. What is the output of the following code?
main()
{
if ((1 || 0) && (0 || 1)) {
printf("OK I am done.");
} else {
printf("OK I am gone.");
}
}
a) none of the above
b) compile error
c) OK I am gone
d) OK I am done

Answer: d)
((1 || 0) && (0 || 1)) will be:
(( 1 ) && ( 1 ))
(1 && 1) =>1: so will print: OK I am done.

4. What is the difference between structure & union?

Answer :1. Union allocates the memory equal to the maximum memory required by the member of the union but structure allocates the memory equal to the total memory required by the members.
2. In union, one block is used by all the member of the union but in case of structure, each member has its own memory space.
3. Union is best in the environment where memory is less as it shares the memory allocated. But structure cannot be implemented in shared memory.
4. As memory is shared, ambiguity is more in union, but less in structure.
5. Self-referential union cannot be implemented in any data structure, but self-referential structure can be implemented.

5. What is a wild pointer?
Answer:Wild pointer is a pointer that doesn't point to either a valid object (of the indicated type, if applicable), or to a distinguished null value, if applicable.

C Programming Basic Questions
Array in�Embedded C
C Programming�Viva�Questions
Dangling and Wild Pointers
Variables and Pointers Volatile Or Constant
C Questions for Job Interview
CONTINUE READING �
Update Contact :
No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email : Fajarudinsidik@gmail.com
NB :: Bila Sobat tertarik Ingin membuat software, membeli software, membeli source code, membeli hardware elektronika untuk kepentingan Perusahaan maupun Tugas Akhir (TA/SKRIPSI), Insyaallah Saya siap membantu, untuk Respon Cepat dapat menghubungi kami, melalui :

No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email: Fajarudinsidik@gmail.com


atau Kirimkan Private messanger melalui email dengan klik tombol order dibawah ini :

ٱلْحَمْدُ لِلَّهِ رَبِّ ٱلْعَٰلَمِين
Alhamdulilah hirobil alamin

وَ السَّلاَمُ عَلَيْكُمْ وَرَحْمَةُ اللهِ وَبَرَكَاتُهُ
wassalamualaikum warahmatullahi wabarakatuh


Artikel Variables Pointer Array And Files - C Programming Questions For Job Interview, Diterbitkan oleh scodeaplikasi pada Sabtu, 28 November 2015. Semoga artikel ini dapat menambah wawasan Anda. Website ini dipost dari beberapa sumber, bisa cek disini sumber, Sobat diperbolehkan mengcopy paste / menyebar luaskan artikel ini, karena segala yang dipost di public adalah milik public. Bila Sobat tertarik Ingin membuat software, membeli software, membeli source code ,Dengan Cara menghubungi saya Ke Email: Fajarudinsidik@gmail.com, atau No Hp/WA : (fajar) : 085369237896, (puat) : 085267792168.

Tawk.to