1,279 views

2 Answers

Best answer
2 2 votes
ptr += 4; // leave 4 element
printf("%s",++ptr); //increment pointer.

i.e. leave 5 element and after that print untill null is encountered.
 2017
• selected by
Answer:
Position:
Show:

Related questions

5 5 votes
2 answers 2 answers
1.6k
1.6k views
Arjun asked Oct 18, 2016
1,598 views
What will be the output of the following program?#include <stdio.h void f1(int p1, int *p2, int p3) { p1 = 20; *p2 = p1; p3 = *p2; p1 = 10; } int main() { int a = 5, b ...
9 9 votes
2 2 answers
2.9k
2.9k views
Arjun asked Oct 18, 2016
2,878 views
Consider the following C function:void foo() { int a[10][20][30] = {0}; __________ printf("%d", a[3][4][5]); }Which of the following could be used in the missing line so ...
6 6 votes
1 1 answer
3.3k
3.3k views
Arjun asked Oct 18, 2016
3,329 views
Consider the following incomplete C function for reversing a singly linked list.node* reverse(node* trav){ if(trav->next) __________________ else { head - next = null; he...
9 9 votes
2 answers 2 answers
2.4k
2.4k views
Arjun asked Oct 18, 2016
2,426 views
int foo(int n) { if(n 10000) return 1; int sum = 0, i; for( i = 0; i < n; i++) { sum += i; } return sum; }The value returned by the above function is$\Theta\left(n^2\rig...