[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

Arrays Questions

Home > Technical Aptitude > C Programming > Arrays > General Questions
NA
SHSTTON
56
Solv. Corr.
131
Solv. In. Corr.
187
Attempted
0 M:0 S
Avg. Time

31 / 55

Choose the correct option.

Match the following with reference to the following program code.

#include

void main ()
{
int x [3][4] = {{1,6,9,12},{11,17,3,2},{20,23,4,5}};
int *n = &x;
}
(i) *(*(x + 1) + 1) (1) 9
(ii) *(*x + 1) + 3 (2) 13
(iii) *(n + 3) + 1 (3) 4
(iv) ++(*n++) + *n (4) 17


Ai - 3, ii - 1, iii - 2, iv - 4

Bi - 2, ii - 4, iii - 1, iv - 3

Ci - 4, ii - 3, iii - 2, iv - 1

Di - 4, ii - 3, iii - 1, iv - 2

Answer: Option C

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
154
Solv. Corr.
253
Solv. In. Corr.
407
Attempted
0 M:5 S
Avg. Time

32 / 55

Which statement is wrong given the following code?
int a[] = {5,  7,  9},  *p =  a, b;

Ab = *p++;

Bb = *++p++;

Cb = *++p;

Db = ++*p, **p++;

Answer: Option B

Explanation:

error: lvalue required as increment operand

Workspace

NA
SHSTTON
92
Solv. Corr.
185
Solv. In. Corr.
277
Attempted
0 M:0 S
Avg. Time

33 / 55

What is the output of the program?
#include <stdio.h>
void main () {
int mat [4][5] = {1,2,3,4,5,6,7,8,9,10,11,12};
printf("%d %d ", *mat[*(mat[3] + 2)], 2[5 + 2[mat] - 3]);
}

A1 1

B1 0

C0 1

D0 0

Answer: Option B

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
272
Solv. Corr.
174
Solv. In. Corr.
446
Attempted
0 M:5 S
Avg. Time

34 / 55

Choose the correct optionn

Declare the following statement ?

"An Array of three pointers to chars"


Achar *ptr[3]();

Bchar *ptr[3];

Cchar (*ptr[3]) ();

Dchar **ptr[3];

Answer: Option B

Explanation:

c

Workspace

NA
SHSTTON
7
Solv. Corr.
18
Solv. In. Corr.
25
Attempted
0 M:0 S
Avg. Time

35 / 55

Choose the correct option.

When an array is passed as parameter to a function, which of the following statement is correct


AThe function can change values in the original array

BIn C parameters are passed by value. The function cannot change the original value in the array

CIt results in compilation error when the function tries to access the elements in the array

DResults in a run time error when the function tries to access the elements in the array

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
7
Solv. Corr.
16
Solv. In. Corr.
23
Attempted
0 M:0 S
Avg. Time

36 / 55

What will be the output?
void main()
{
    int a[]={1,3,5,7};
    printf("%d",&a[3]-&a[1]);
}

A1

B2

C3

D4

ENone of these

Answer: Option B

Explanation:

&a[i] = &a + i;

Hence, &a[3] - &a[1] = (&a + 3) - (&a + 1) = 2

Workspace

NA
SHSTTON
7
Solv. Corr.
9
Solv. In. Corr.
16
Attempted
0 M:0 S
Avg. Time

37 / 55

What will be output of the following "c" code?
#include<stdio.h>
void main()
{
char s[]={'a', 'b', 'c', '\n', 'c', '\0'};
char *p, *str, *str1;
p= &s[3];
str= p;
str1= s;
printf("%d", ++*p++*str1-32);
}

ACompilation Error: invalid operands to binary *

Ba

CSegmentation fault

DB

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
5
Solv. Corr.
8
Solv. In. Corr.
13
Attempted
0 M:0 S
Avg. Time

38 / 55

What will be output of the following "c" code?
#include<stdio.h>
void main()
{
int c[]={2.8,3.4,4,6.7,5};
int j, *p=c, *q=c;
for(j=0; j<5; j++)
{
 printf("%d", *c);
 ++q;
}
for(j=0; j<5; j++)  
{
printf("%d", *p);
 ++p;
}
}

A234522222

B2345

C23452345

D2222223465

Answer: Option D

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
5
Solv. Corr.
9
Solv. In. Corr.
14
Attempted
0 M:0 S
Avg. Time

39 / 55

What will be output of the following "c" code?
#include<stdio.h>
void main()
{
int i, a[50]={1,2,3,4,5};
for( i=0; i<5; i++)
printf("%d",*a++);
}

A1 2 3 4 5

B2 3 4 5 6

CCompilationEerror: lvalue required as increment operand

DNone of these

Answer: Option C

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
10
Solv. Corr.
6
Solv. In. Corr.
16
Attempted
0 M:0 S
Avg. Time

40 / 55

Choose the correct option.

lf S is an array of 80 characters, then the value assigned to S through the statement scanf("%s" ,S) with input 12345 would be


A"12345"

Bnothing since 12345 is an integer

CS is an illegal name for a string

D%s can not be used for reading in values of S.

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

C Programming Arrays Questions and Answers pdf

At C Programming topic Arrays page No: 4 you will find list of 10 practice questions, tips/trick and shortcut to solve questions, solved questions, quiz, and download option to download the whole question along with solution as pdf format for offline practice. You can practice all the listed C Programming Arrays topic questions offline too, by downloading the MCQs practice question of Arrays with detail solution, with formula/Tips & Tricks, with Solved examples and with top-rated users answers, which will give you best answer ascross webs. It is one of the perfect Arrays e-book pdf covering all types of questions in detail. These C Programming test with answers pdf cover all types of question asked in IIFT, XAT, SNAP, GRE, GMAT, NMAT, CMAT, MAT or for IT companies written exam like Wipro, HCL, Infosys, Accenture, Government exams, IBPS Exams etc. There are multiple formats to download your online free C Programming Arrays e-book, like fully solved, unsolved questions with Answers sheet. Even you can customize your ebook format by adjusting the given options in the download section to make it your one of the best C Programming topic-based ebook. It is recommended to bookmark this page C Programming Arrays for your preparation. Most of the students and fresher candidates finding it hard to clear the C Programming section in exams. Here Given Arrays practice questions, quiz, fully solved questions, tips & trick and Mock tests, which include question from each topic will help you to excel in Arrays. Each test has all the basics questions to advanced questions with answer and explanation for your clear understanding, you can download the test result as pdf for further reference.

At C Programming topic Arrays, you will get multiple online quiz difficulty wise, which will have a total of 6 quizzes, categorized as easy, medium, and moderate level. While preparing for any Arrays, take all the list quiz and check your preparation level for that topic. Each quiz have 10 different question, which needs to be answered in 20 min., all the listed quiz here is free, however, you will get only one chance for each quiz to attempt(Take Quiz seriously), so it is always recommended to take one quiz in each section before you start solving Arrays MCQs practice question, and one after solving all the question of the respective level, you can refer back your Arrays quiz result any time or you can download it as pdf for reference.

C Programming Arrays Customize Online Mock Test

This is own type of mock test, where At this C Programming Arrays MCQs mock test section, you will able to attempt only the questions related to Arrays, in that question will be a different level, important, and all the questions will be part of some of the mock tests across Q4interview FREE Mock test. You need to choose the topic as Arrays, and click on Double click to generate your customize mock test. While attempting the mock test you need to choose any of the one options out of given option. It is recommended to go through the direction given along with each question, as these questions will be randomly and so that same direction will not be applicable across the entire test. Once you submit your mock test, the result will be generated for Arrays Customize mock test, where your performance point points will be highlighted. Q4interview analysis every single point which helps you to improve your topic understanding and help you to know your type of mistakes and way to improve Arrays questions, by providing the same type of practice questions from practice exercise. The best part of this Arrays, all these mock tests listed here are free and you can take as Many time, as many you want. When you continue to give Arrays Customize Online Mock Test here regularly, then you will understand how much you have developed your accuracy on a topic, after that you will be able to decide how much attention you need to focus on. Your continued practice will increase your confidence, speed and thinking ability intensely, the Arrays Customize topic on which you will practice more will beneficial for you in future during campus placement.Arrays Mock Tests

C Programming Arrays Quiz Online Test

The details of the C Programming Arrays quiz are as follows. There are 10 questions for you. You have to answer them in 20 minutes. Within 20 minutes you have to see the errors in the sentences given as a question. Four options are also given to you, and you have to choose your opinion. You must be confident in your answer that the choices are difficult. Therefore, below we provide you with some information about C Programming Arrays that you see and keep them in mind while answering questions.

C Programming Arrays MCQs Practice Questions with Answer

On this Arrays section of page you will find the easiest quickest ways to solve a question, formulas, shortcuts and tips and tricks to solve various easiest methods to solve Arrays Question Quickly. It contains all the C Programming topic Arrays questions which are common in any of the preliminary exams of any company. The solution is provided along with the questions. The practice of these questions is a must as they are easy as well as scoring and asked in all the exams They will confirm the selection if all the questions attempted wisely with little practice. It is recommanded to Take Mock test based on C Programming topic and Arrays topic based quiz.

C Programming Arrays solved examples question

Clarity of concepts is a must if you want to master the skill of solving C Programming problems. This page contains sample C Programming Arrays questions and answers for freshers and competitive exams. Arrays Questions with the detailed description, the explanation will help you to master the topic. Here solved examples with detailed answer description, explanations are given and it would be easy to understand. How to solve qArraysC Programming? Here are some examples solved with the Common Rules/tricks/tips of C Programming. Enhance your chance to score maximum marks in C Programming sections through. Error Spotting Grammar Questions Online Test for Free. Fully solved Sentence Formation MCQs questions with detailed answer description. C Programming is an important topic for any exams but most aspirants find it difficult. You need to learn various tricks tips, rules, etc to solve quickly. At this page, you will find frequently asked Arrays questions or problems with solutions, shortcuts, formulas for all-important competitive exams like IT companies exams, interviews. It is always a best practice to go through the example and understand the types of question and way to solve it, so let's do some examples to calculate efficiency, read through all the given here solved examples. You can post your solution, tips, trick and shortcut if you have any in respect to questions.

You can get here fully solved Arrays examples with a detailed answer and description. You can solve Arrays problems with solutions, the questions by companies wise by filtering the questions, additionally, you can check what type of questions are being asked in IT companies Written Round from Arrays. Arrays became one of the most important sections in the entire competitive exams, Companies Campus, and entrance online test. Go through Arrays Examples, Arrays sample questions. You can Evaluate your level of preparation in Arrays by Taking the Q4Interivew Arrays Online Mock Test based on most important questions. All the Arrays practice questions given here along with answers and explanations are absolutely free, you can take any number of time any mock Test.

Why C Programming Arrays?

In this practice section, you can practice C Programming Questions based on "Arrays" and improve your skills in order to face the interview, competitive examination, IT companies Written exam, and various other entrance tests (CAT, GATE, GRE, MAT, Bank Exam, Railway Exam etc.) with full confidence.

Where can I get C Programming Arrays questions and answers with explanation?

Q4Interview provides you lots of fully solved C Programming (Arrays) questions and answers with Explanation. Solved examples with detailed answer description, explanation are given and it would be easy to understand. You can download C Programming Arrays quiz questions with answers as PDF files and eBooks.

Where can I get C Programming Arrays Interview Questions and Answers (objective type, multiple-choice, quiz, solved examples)?

Here you can find objective type C Programming Arrays questions and answers for interview and entrance examination. Multiple choice and true or false type questions are also provided.