• Result
  • Today's Puzzle
    • Previous Puzzles
    • Prize & Rules
  • Discussion Board
    • Suggestion Board
    • Trending Articles
  • Maths Tricks
  • Placement Papers
    • Placement Questions
    • Interview Experience
    • Placed user Comment
    • Group Discussion
  • English APP
  • login
  • Result
  • Today's Puzzle
    • Previous Puzzles
    • Prize & Rules
  • Discussion Board
    • Suggestion Board
    • Trending Articles
  • Maths Tricks
  • Placement Papers
    • Placement Questions
    • Interview Experience
    • Placed user Comment
    • Group Discussion
  • Walkins
    • Corporate Job Exam
    • Government Job Exam
    • Entrance Exam
  • Training
    • Internship
  • Placement Questions
  • /
  • C

Frequently Asked c interview questions and answers for freshers Page 7

c Select Another Category Select Another Topic

Programming and Technical

  • Android 118
  • ASP.NET 60
  • C 459
  • C++ 448
  • DATA STRUCTURE 66
  • DBMS 77
  • ELECTRONICS 39
  • Java 261
  • OOPs Concepts 117
  • Operating Syst 103
  • RDBMS 109
  • UNIX 70

c Question Topics

    Category (16)

    General Ability (2)

  • General Knowledge (2)
  • HR Interview (2)

  • Interview (2)
  • Logical Reasoning (9)

  • Coding Decoding (2)
  • Cryptography (1)
  • General Mental Ability (1)
  • Letter Series (1)
  • Mathematical Reasoning (1)
  • Missing Character (1)
  • Seating Arrangement (1)
  • Numerical Ability (12)

  • Age Problem (1)
  • Algebra (1)
  • Alligation or Mixture (1)
  • Data Interpretation (1)
  • Height and Distance (1)
  • Percentage (2)
  • Ratio and Proportion (1)
  • Time Distance and Speed (1)
  • Programming (218)

  • Arrays (15)
  • Basics (8)
  • Database (6)
  • Definition (25)
  • Functions (4)
  • Output (42)
  • Program (85)
  • Puzzles (1)
  • Technical (24)
  • Variables (1)
  • Verbal Ability (3)

  • Antonyms (1)
  • Miscellaneous (1)
  • Spotting Errors (1)
Keep an EYE (0)
Solved Question (6) UnSolved Question (454)
Pages: 46FirstPrev3456789101112NextLast
Advertisements

(#M40031846) C QUESTION Keep an EYE Keep an eye puzzle Keep an eye puzzle

What will the following program do?
void main()
{
int i;
char a[]="String";
char *p="New Sring";
char *Temp;
Temp=a;
a=malloc(strlen(p) + 1);
strcpy(a,p); //Line number:9//
p = malloc(strlen(Temp) + 1);
strcpy(p,Temp);
printf("(%s, %s)",a,p);
free(p);
free(a);
} //Line number 15//
a) Swap contents of p & a and print:(New string, string)
b) Generate compilation error in line number 8
c) Generate compilation error in line number 5
d) Generate compilation error in line number 7
e) Generate compilation error in line number 1

Asked In C Rajendra Singh (11 years ago)
Unsolved Read Solution (5)
Is this Puzzle helpful?   (24)   (13) Submit Your Solution

(#M40031848) C QUESTION Keep an EYE Keep an eye puzzle Keep an eye puzzle

What will be the output for the following C program ..??

void main()
{
int i;
for(i=1;i<4,i++)
switch(i)
case 1: printf("%d",i);break;
{
case 2:printf("%d",i);break;
case 3:printf("%d",i);break;
}
switch(i) case 4:printf("%d",i);
}

Asked In C Rajendra Singh (11 years ago)
Unsolved Read Solution (5)
Is this Puzzle helpful?   (4)   (9) Submit Your Solution
Advertisements

(#M40165556) C QUESTION print the pattern of the following form containing the numbers from 1to n Keep an EYE Keep an eye puzzle Keep an eye puzzle

4 4 4 4 4 4 4
4 3 3 3 3 3 4
4 3 2 2 2 3 4
4 3 2 1 2 3 4
4 3 2 2 2 3 4
4 3 3 3 3 3 4
4 4 4 4 4 4 4

Asked In C Sannapureddy Srinivasareddy (7 years ago)
Unsolved Read Solution (5)
Is this Puzzle helpful?   (21)   (1) Submit Your Solution Program

(#M40029221) C QUESTION C Keep an EYE Keep an eye puzzle Keep an eye puzzle

main()
{
static int var = 5;
printf("%d ",var--);
if(var)
main();
}
find output

Asked In C MAN (12 years ago)
Unsolved Read Solution (7)
Is this Puzzle helpful?   (12)   (3) Submit Your Solution Interview

(#M40018744) C QUESTION C- QUESTIONS Keep an EYE Keep an eye puzzle Keep an eye puzzle

What will be the output of the program ?
#include

int main()
{
static char *s[] = {"black", "white", "pink", "violet"};
char **ptr[] = {s+3, s+2, s+1, s}, ***p;
p = ptr;
++p;
printf("%s", **p+1);
return 0;
}
Options
1) ink
2) ack
3) ite
4) let

Asked In C (12 years ago)
Unsolved Read Solution (1)
Is this Puzzle helpful?   (13)   (4) Submit Your Solution Program

(#M40037357) C QUESTION C question Keep an EYE Keep an eye puzzle Keep an eye puzzle

‪#‎include‬
int print(int n)
{
if(n==0)
return 0;
print(n-1);
printf("%dn",n);
}
int main()
{
int n=0,x=3;
n=print(x);
printf("%dn",n);
return 0;
}
explain the o/p?

Asked In C thadaka prashanth kumar (11 years ago)
Unsolved Read Solution (19)
Is this Puzzle helpful?   (12)   (1) Submit Your Solution Program

(#M40153810) C QUESTION find the out put of the following program Keep an EYE Keep an eye puzzle Keep an eye puzzle

main()
{
char *str = "12345";
printf("%c %c %cn", *str, *(str++), *(str++));
}

Asked In C Ravi teja (10 years ago)
Unsolved Read Solution (4)
Is this Puzzle helpful?   (5)   (6) Submit Your Solution Technical

(#M40157829) C QUESTION Keep an EYE Keep an eye puzzle Keep an eye puzzle

integer x = 0 // statement 1
integer sum = 0 // statement 2
while ( x < 10 ) // statement 3
{
sum = x*x*x // statement 4
x = x + 1 // statement 5
}
print sum // statement 6

Asked In C kanaka (8 years ago)
Unsolved Read Solution (7)
Is this Puzzle helpful?   (13)   (3) Submit Your Solution Program

(#M40029340) C QUESTION C Keep an EYE Keep an eye puzzle Keep an eye puzzle

Q. What will be the result of the following code?
#define TRUE 0 // some code
while(TRUE)
{
// some code
}

A. This will not go into the loop as TRUE is defined as 0.

Asked In C MAN (12 years ago)
Unsolved
Is this Puzzle helpful?   (1)   (0) Submit Your Solution

(#M40029368) C QUESTION C Keep an EYE Keep an eye puzzle Keep an eye puzzle

Q. What is difference between .com program and .exe program?

A. Both .com and .exe program are executable program but .com program execute faster than .exe program. All drivers are .com program. .com file has higher preference than .exe For example

Asked In C MAN (12 years ago)
Unsolved Read Solution (1)
Is this Puzzle helpful?   (5)   (1) Submit Your Solution
Keep an EYE (0)
Solved Question (6) UnSolved Question (454)
Pages: 46FirstPrev3456789101112NextLast
  • Login
  • Register

Resend

Sponsored Links

Advertisements

Challenger of the Day

no image
Dimple
India
Punjab
Time: 00:01:33
Points
19

Maths Quotes

"Maths is the queen of all sciences", Whatever rules your world ; "SHE" rules them!!!

Arun V K

[G]eometry is not true, it is advantageous.

~Henri Poincaré

Placed User Comments

M4Math helped me a lot.

Vipul Chavan 5 years ago

Thanks m4 maths for helping to get placed in several companies.
I must recommend this website for placement preparations.

yash mittal 5 years ago

Now enjoy Offline Access of latest Question.

Get M4maths app to avail expert's solution and latest selected questions.

Download m4maths app now

  • 2533K+Registerd user
  • 1774K+Engineers
  • 759K+MBA Asprirant
  • 3K+Enginnering College
  • 250+Company Exam
  • 150K+Interview Questions
  • Site Links
  • Home
  • Result
  • Today's Puzzle
  • Discussion Board
  • Maths Tricks
  • Advertise with us
  • Contact Us
  • Useful Info
  • Maths Quotes
  • Previous Puzzles
  • Prize
  • Privacy Policy
  • Disclaimer and Copyright
  • Terms and Conditions
  • Sitemap
  • Placement papers
  • TCS Placement Paper
  • HCL Placement Paper
  • INFOSYS Placement Paper
  • IBM Placement Paper
  • SYNTEL Placement Paper
  • TECHNICAL Interview
  • HR Interview
All rights are reserved to @m4maths.com