Curioustab
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Home
»
Technical Questions
»
Programming
What would be the output of the following program ? main() { const int x = 5; int *ptrx; ptrx = &x; *ptr = 10; printf ("%d", x); }
5
10
Error
Garbage value
Correct Answer:
10
← Previous Question
Next Question→
More Questions from
Programming
Point out the error in the following program. main() { char mybuf[] = "Zanzibar" ; char yourbuf[] = " Zienckewiz"; char * const ptr = mybuf; *ptr = 'a'; ptr = yourbuf; }
What do the functions atoi(), itoa() and gcvt () do? Show how would you use them in a program.
What's the difference between the functions rand(), random(), srand() and randomize()?
What will be output when you will execute following c code? #include void main() { switch(2) { case 1L:printf("No"); case 2L:printf("%s","I"); goto Love; case 3L:printf("Please"); case 4L:Love:printf("Hi"); } }
Write a c program for linear search.
Rewrite the following set of statements using conditional operators. int a =1, b ; if ( a > 10 ) b = 20;
How many times the following program would print 'Jamboree'? main() { printf ( "\nJamboree"); main (); }
Macro flowchart is also called as
public abstract interface Frobnicate { public void twiddle(String s); } Which is a correct class?
Convert the expression ((A + B) * C – (D – E) ^ (F + G)) to equivalent Prefix Notation
Discussion & Comments
No comments yet. Be the first to comment!
Name:
Comment:
Post Comment
Join Discussion
Discussion & Comments