Tags » C-2

Program : Print the smallest palindrome after a particular number

#include<stdio.h>
int main(void)
{
int n,rem,temp,i,t,j,k;
scanf("%d",&t);
int arr[t];
for(j=0;j<t;j++)
{
scanf("%d",&arr[j]);
}
for(k=0;k<t;k++)
{
n=arr[k];

for(i=n+1;i<100000;i++)
{
int rev=0;
temp=i;
while(i!=0)
{
rem=i%10;
rev=rev*10+rem; 13 more words

Code

Is It Safe?

Remember this classic torture scene in “Marathon Man“? D’oh! Now, suppose you had to create the representation of a message that simply aggregates… 182 more words

Technical

Price of a Kiss, by Linda Kage

Grade: C+

Doing it at: 85%

Catnip: Just a Gigolo; Hot Neighbor; Dangerous Ex; Friends to Lovers

Shame Scale: Not the high shame book that I wanted. 1,147 more words

Friends To Lovers

MethodImplOptions.InternalCall

StackOverflow, like Wikipedia, is a dangerous place. It’s a place where you go to learn something you didn’t know you wanted to learn. In both cases, the risk is: are you going to resurface, half an hour later, much the wiser on the French Revolution, or perhaps some nitty gritty feature of the Garbage Collector? 275 more words

C#

C++ PROGRAMMING QUESTIONS AND SOLUTION

1. What is stored in list after the following C++ code executes?
int list;
list[0] = 2;
list[1] = 3;

for (int i = 2; i < 10; i++)
{
list[i] = list + list;

if (i > 7)
list[i] = 2 * list[i] - list;
} 246 more words
Technical Round

C++ PROGRAMMING QUESTIONS PART-3 WITH SOLUTION

1. What is wrong with the following program?
#include <iostream>                               //Line 1
namespace std;                                    //Line 2
int main() //Line 3

{                                                 //Line 4

cout << "*$*" << endl;                            //Line 5
return 0;                                         //Line 6

}                                                 //Line7… 370 more words
Interviews

C++ PROGRAMMING QUESTIONS PART-2 WITH SOLUTION

1. Consider the following function definition:
int func(int x, double y, char u, string name)

{

//function body

}

Which of the following are correct function prototypes of the function func? 632 more words
Interviews