Right Place For Right PersonTM 
Home Tutorials Articles Forums Source Code Books Certifications Interviews Questions
Total Questions:-397     Goto Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

R4R ---> Forums--> C -->C Forums List

Page 1



Topic
 #define f(g,g2) g##g2

main()
{
   int var12=100;
   printf("%d",f(var,12));
 }
Post On Our Forums
Views
100
  More --- >>
Posted Date:


Topic
 #include<stdio.h>
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);
}
Post On Our Forums
Views
M

p is pointing to character '\n'.str1 is pointing to character 'a' ++*p meAnswer:"p is pointing to '\n' and that is incremented by one." the ASCII value of '\n' is 10. then it is incremented to 11
  More --- >>
Posted Date:


Topic
 Is the following code legal?

typedef struct a
{
   int x;
   aType *b;
}aType
Post On Our Forums
Views
No

The typename aType is not known at the point of declaring the structure (forward references are not made for typedefs).
  More --- >>
Posted Date:


Topic
 main( ){
 static int  a[ ]   = {0,1,2,3,4};
 int  *p[ ] = {a,a+1,a+2,a+3,a+4};
 int  **ptr =  p;
 ptr++;
 printf(�\n %d  %d  %d�, ptr-p, *ptr-a, **ptr);
 *ptr++;
 printf(�\n %d  %d  %d�, ptr-p
Post On Our Forums

Topic
 main()

{
      extern int i;
      i=20;
      printf("%d",i);
}
Post On Our Forums
Views
give buld error as unresolved extern symbol i
  More --- >>
Posted Date:
Views
20
  More --- >>
Posted Date:
Views
it will produce the run time error because it search the external variable while program running and that is not found
  More --- >>
Posted Date:
Views
Unresolved external symbol i ...extern keyword shows that the symbol i is not declared in current scope, and in the program i is not declared in any other scope.
  More --- >>
Posted Date:
Views
Undefined variable i
  More --- >>
Posted Date:
Views
20
  More --- >>
Posted Date:
Views
error
  More --- >>
Posted Date:
Views
Compiler time ErrorUndefined variable i extern int i  is only a declaration not a definition
  More --- >>
Posted Date:
Views
here linker error will come because  extern will say it is defined some where else outside main. so to make it run do int i; outside main
  More --- >>
Posted Date:
Views
Runtime error,because there is no external defnition of i
  More --- >>
Posted Date:
Views
Runtime error,because there is no external defnition of i
  More --- >>
Posted Date:
Views
linker error
  More --- >>
Posted Date:
Views
error
  More --- >>
Posted Date:
Views
The answer will b 20.....since the variable declared as a i just take d reference of variable declared globally
  More --- >>
Posted Date:
Views
Linker error
  More --- >>
Posted Date:
Views
20
  More --- >>
Posted Date:
Views
20
  More --- >>
Posted Date:
Views
20

  More --- >>
Posted Date:
Views
20
  More --- >>
Posted Date:
Views
it will show an error b'coz extern variable cann't be initialized it can initialize only through external linkage.
  More --- >>
Posted Date: prabathilag_609@yahoo.com
Views
error, there is no definition for i.
  More --- >>
Posted Date: shriram_101@hotmail.com


Topic
 main()

{
   int i=5;
   printf("%d%d%d%d%d%d",i++,i--,++i,--i,i);
}
Post On Our Forums
Views
45545

The arguments in function call are pushed into stack from left to right. The evaluation is from right to left.
  More --- >>
Posted Date:
Views
5 6 6 5 5
  More --- >>
Posted Date:
Views
54545
  More --- >>
Posted Date:
Views
54545
  More --- >>
Posted Date:
Views
45545GrabageValue

There are 6 %d...
  More --- >>
Posted Date: rohit_12_oct@yahoo.co.in
Views
Compiler dependent. function parameters are not evaluated in a defined order in C/C++
Can be.. 4 5 5 5 5 or 4 5 5 4 5
  More --- >>
Posted Date: snehal.unique@gmail.com
Views
5 5 6 4 5
  More --- >>
Posted Date: nageshpaul1@gmail.com
Views
i++  i--  ++i  --i  i
 5    6     6   5    5
  More --- >>
Posted Date:
Views
45545
because in printf() calculation will be evaluated right to left.
hence (i++,i--,++i,--i,i)
right to left: i=5,--i=4,(now i=4), ++i=5(now i=5), i--will be 5 this time and printed and (i--=4, b
  More --- >>
Posted Date: rohitjmics37@gmail.com


Topic
 main()

{
   printf("\nab"); 
   printf("\bsi");
   printf("\rha");
}
Post On Our Forums
Views
hai

\n  - newline
\b  - backspace
\r  - linefeed 
  More --- >>
Posted Date:
Views
hai
  More --- >>
Posted Date: vasanth.prabu@ymail.com
Views
hai
  More --- >>
Posted Date: ckeerthisri@yahoo.com
Views
ha
  More --- >>
Posted Date: ckeerthisri@yahoo.com
Views
ha
  More --- >>
Posted Date: p.nagendrababu@gmail.com
Views
hai
  More --- >>
Posted Date: sabibalan111@gmail.com


Topic
 main()
     {
      main();
      }
Post On Our Forums
Views
Runtime error : Stack overflow.

main function calls itself again and again. Each time the function is called its return address is stored in the call stack. Since there is no condition to terminate
  More --- >>
Posted Date:


Topic
 main()
   {
      char *cptr,c;
      void *vptr,v;
      c=10;  v=0;
      cptr=&c; vptr=&v;
      printf("%c%v",c,v);
   }
Post On Our Forums
Views
Compiler error (at line number 4): size of v is Unknown.

You can create a variable of type void * but not of type void, since void is an empty type. In the second line you are creating variable vpt
  More --- >>
Posted Date:
Views
10,0
  More --- >>
Posted Date:


Topic
 main()
{
   char *p = "ayqm";
   char c;
   c = ++*p++;
   printf("%c",c);
}
Post On Our Forums
Views
b

There is no difference between the expression ++*(p++) and ++*p++. Parenthesis just works as a visual clue for the reader to see which expression is first evaluated. 
  More --- >>
Posted Date:
Go: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 Contact Us
Interview Questions And Answers
Struts interview questions and answers (Subjective)
500 Java Objective Questions and Answer
Core Java Objective Questions And Answers
Core Java Subjective Questions And Answers
Core Java Interview Questions And Answers
Core Java Interview Questions and Answers (Subjective)
Core Java Interview Questions and Answers( Objective)
50 Servlet interview questions
155 Java Interview Questions
EJB Interview Questions and Answers(Subjective)
R4R,JSP Interview Questions and Answer(Subjective)
R4R,Java Servlets Interview Questions and Answers(Subjective)
Core Java Subjective ,Objective and Interview Questions And Answers
275 Core java interview questions
Java Objective Questions and Answer
Java Architect Interview Questions
Applet Interview Questions and Answers
Core Java example
Servlet Objective Questions And Answers
Servlet Subjective Questions And Answers
Servlet Interview Questions And Answers
JSP Objective Questions And Answers
JSP Subjective Questions And Answers
JSP Interview Questions And Answers
JDBC Objective Questions And Answers
JDBC Subjective Questions And Answers
JDBC Interview Questions And Answers
JDBC Interview questions and answers
Networking Interview questions and answers
Servlets Interview questions and answers
EJB Objective Questions And Answers
EJB Subjective Questions And Answers
EJB Interview Questions And Answers
Hibernate Objective Questions And Answers
Hibernate Subjective Questions And Answers
Hibernate Interview Questions And Answers
Spring Objective Questions And Answers
Spring Subjective Questions And Answers
Spring Interview Questions And Answers
Struts Objective Questions And Answers
Struts Subjective Questions And Answers
Struts Interview Questions And Answers
Ant Objective Questions And Answers
Ant Subjective Questions And Answers
Ant Interview Questions And Answers
PHP Objective Questions And Answers
PHP Subjective Questions And Answers
PHP Interview Questions And Answers 1
ASP.net Objective Questions And Answers
ASP.net Subjective Questions And Answers
ASP.net Interview Questions And Answers 1
ASP.net interview questions ,ASP.net interview answers,ASP.net interview questions and answers
PHP interview questions ,PHP interview answers,PHP interview questions and answers
Testing Objective Questions And Answers
Testing Subjective Questions And Answers
Testing Interview Questions And Answers
Ajax Tutorials
Ajax Objective Questions And Answers
Ajax Subjective Questions And Answers
Ajax Interview Questions And Answers
Linux Objective Questions And Answers
Linux Subjective Questions And Answers
Unix Subjective Questions And Answers
Unix Interview Questions And Answers
HR interview questions and answers
HR Interview Questions Tips
HR Objective Questions And Answers
HR Subjective Questions And Answers
HR Interview Questions And Answers
Learn C Language with in a day
 C /C++ Questions
C Objective Questions And Answers
C Subjective Questions And Answers
C Interview Questions And Answers
C Objective Interview Questions And Answers(10)
C Subjective Interview Questions And Answers(100) 
C syntax,semantics and simple programming questions(61) 

Linux Interview Questions And Answers
Unix Objective Questions And Answers
C Aptitude Questions(179)
C++ Interview Questions And Answers    
C++ Objective Questions And Answers
C++ Subjective Questions And Answers
C++ Interview Questions And Answers
C,C++ objective Interview Questions and answers
C Interview Questions And Answers( Objective and Subjective)
C Objective Interview Questions And Answers(10)

C Subjective Interview Questions And Answers(100)

C,C++ Interview Questions

35 C++ Interview Questions And Answers(Subjective)

109 C++ Interview Questions

Java Script Interview Question and Answer(1-10).
 Java Script Interview Question and Answer(11-20).
Java Script  Interview Question and Answer(21-30).
Java Script Interview Question and Answer(31-40).
Javascript Objective Questions And Answers
Javascript Subjective Questions And Answers
Javascript Interview Questions And Answers
MFC Interview Questions And Answers(Subjective)

MFC Interview Questions And Answers(Subjective)

ATL Interview Questions And Answers(Subjective)

COM DCOM Interview Questions And Answers(Subjective)

Win32API Interview Questions And Answers(Subjective)

ActiveX Interview Questions And Answers(Subjective)

R4R, VC++ AllOther Interview Questions And Answers(Subjective)

PL/SQL Interview Questions And Answers(Subjective)

152 PL/SQL Interview Questions And Answers(Subjective)

Asp Objective Questions And Answers
Asp Subjective Questions And Answers
Asp Interview Questions And Answers 1

VB Objective Questions And Answers

Contact US:

Your Name:


Your Email:

Message:

Comments:

Give Your Comments: http://www.r4r.co.in/forums/c/C_Forums.php?

Post Your Comments

Your Name:

Your Email ID :
Comments :
URL
  =* Enter SUM

Go Back


Advertiser PRIVACY POLICY ||User PRIVACY POLICY || R4R Group Srvices