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

Arrays And Pointer in C Programming -Job Interview Frequently Asked Question

0 komentar


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

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

Collection of most Frequently Asked Question for Array and Pointer in C Programing in Practical viva in Engineering or job interview to a candidate.
C Programming Basic Questions
Array in�Embedded C

1.What is the output of the program?
main()
{
int a[] = {0, 0X4, 4, 9};
int i = 2;
printf(�%d %d�, a[i], i[a]);
}

a) 0 2
b) 2 0
c) 4 0
d) 4 4
ANSWER: D
2.What is the value of i in the following code?
main()
{
int i = strlen(�BLUE�) + strlen(�PURPLE�) / strlen(red) � strlen(green);
printf(�%d�, i);�
}

a) 1
b) -2
c) -1.666
d) -1
ANSWER: A

3.What is the output of the following code?
int cap(int);
main()
{
int n; n = cap(6);
printf(�%d�, n);
}
int cap(int n)
{
if (n <=1) return 1;
else return(cap(n -3) + cap(n-1));
}

a) 7
b) 8
c) 9
d) 10
ANSWER: C

4.Which of the following is the correct way to access the last element of the array arr, if arr is declared as int arr[3][3][4]?

a) *(*( (arr + 2 ) + 2) + 4)
b) *(*( *(arr + 3 ) + 3) + 4)�
c) *(*( *(arr + 2 ) + 3) + 4)
d) *(*( *(arr + 2 ) + 2) + 3)
ANSWER: D

5.Which of the following is the correct output for the program given below?
#include <stdio.h>
int main()
{
int size;
scanf(�%d�, &size);
int arr[size];
for(i =1; I <= size; i++)
{
scanf(�%d�, arr[i]);
printf(�%d�, arr[i]);
}
return 0;
}

a) The code is erroneous science the subscript for array used in for loop is in the range 1 to size.
b) The code is erroneous science the values of array are getting scanned through a loop.
c) The code is erroneous science the statement declaring array is invalid.
d) The code is correct and runs successfully.�
ANSWER: C
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 Arrays And Pointer in C Programming -Job Interview Frequently Asked Question, Diterbitkan oleh scodeaplikasi pada Rabu, 29 Juli 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