I can be able to save store address programmatically by
$_address=nl2br('123\nTest',false);
$config->saveConfig('general/store_information/address',$_address,'default',0);
But the problem is \n are not converting into new lines even if I use nl2br.What could be the issue?
When using \n, \r or $someVar inside a php string, you need to use double quotes.
Try this: